Merge pull request #784

087373e Fix potential race with parallel processing of txes/signatures/blocks (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2016-04-14 16:25:53 +09:00
commit 8f78f1407e
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
2 changed files with 2 additions and 0 deletions

View file

@ -2143,6 +2143,7 @@ bool Blockchain::check_tx_inputs(const transaction& tx, tx_verification_context
if(ioservice_active) \
{ \
work.reset(); \
while (!ioservice.stopped()) ioservice.poll(); \
threadpool.join_all(); \
ioservice.stop(); \
ioservice_active = false; \

View file

@ -73,6 +73,7 @@ using namespace cryptonote;
#define KILL_IOSERVICE() \
do { \
work.reset(); \
while (!ioservice.stopped()) ioservice.poll(); \
threadpool.join_all(); \
ioservice.stop(); \
} while(0)