Port Thread* methods to boost::thread_group
This commit is contained in:
12
src/main.cpp
12
src/main.cpp
@@ -1560,15 +1560,9 @@ bool FindUndoPos(CValidationState &state, int nFile, CDiskBlockPos &pos, unsigne
|
||||
|
||||
static CCheckQueue<CScriptCheck> scriptcheckqueue(128);
|
||||
|
||||
void ThreadScriptCheck(void*) {
|
||||
vnThreadsRunning[THREAD_SCRIPTCHECK]++;
|
||||
void ThreadScriptCheck() {
|
||||
RenameThread("bitcoin-scriptch");
|
||||
scriptcheckqueue.Thread();
|
||||
vnThreadsRunning[THREAD_SCRIPTCHECK]--;
|
||||
}
|
||||
|
||||
void ThreadScriptCheckQuit() {
|
||||
scriptcheckqueue.Quit();
|
||||
}
|
||||
|
||||
bool CBlock::ConnectBlock(CValidationState &state, CBlockIndex* pindex, CCoinsViewCache &view, bool fJustCheck)
|
||||
@@ -2867,7 +2861,9 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
|
||||
}
|
||||
}
|
||||
uint64 nRewind = blkdat.GetPos();
|
||||
while (blkdat.good() && !blkdat.eof() && !fRequestShutdown) {
|
||||
while (blkdat.good() && !blkdat.eof()) {
|
||||
boost::this_thread::interruption_point();
|
||||
|
||||
blkdat.SetPos(nRewind);
|
||||
nRewind++; // start one byte further next time, in case of failure
|
||||
blkdat.SetLimit(); // remove former limit
|
||||
|
||||
Reference in New Issue
Block a user