mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
Fix potential race with parallel processing of txes/signatures/blocks
This commit is contained in:
parent
e7c8a32a28
commit
087373eccf
@ -2159,6 +2159,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; \
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user