diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-03-06 22:31:26 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-04-03 19:57:13 -0400 |
commit | 21eb5adadbe3110a8708f2570185566e1f137a49 (patch) | |
tree | 706908964d4a02c6d2fc2fe8968a65c449a3c38a /src/main.cpp | |
parent | 72f14d26ecc67a210a29d7914e580b8e67e45d8e (diff) |
Port Thread* methods to boost::thread_group
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp index 53ec554611..39a291d078 100644 --- a/src/main.cpp +++ b/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 |