inline bool PBFParser::Parse() { // Start the read and parse threads boost::thread readThread(boost::bind(&PBFParser::ReadData, this)); //Open several parse threads that are synchronized before call to boost::thread parseThread(boost::bind(&PBFParser::ParseData, this)); // Wait for the threads to finish readThread.join(); parseThread.join(); return true; }
inline void PBFParser::ParseStep(ParsingStep step) { parsingStep = step; ReadHeader(); #ifndef NDEBUG blockCount = 0; groupCount = 0; #endif // Start the read and parse threads boost::thread readThread(boost::bind(&PBFParser::ReadData, this)); //Open several parse threads that are synchronized before call to boost::thread parseThread(boost::bind(&PBFParser::ParseData, this)); // Wait for the threads to finish readThread.join(); parseThread.join(); CleanQueue(); }