Exemplo n.º 1
0
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;
}
Exemplo n.º 2
0
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();
}