mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-27 05:13:25 +01:00
Merge pull request #784
087373e
Fix potential race with parallel processing of txes/signatures/blocks (moneromooo-monero)
This commit is contained in:
commit
8f78f1407e
@ -2143,6 +2143,7 @@ bool Blockchain::check_tx_inputs(const transaction& tx, tx_verification_context
|
|||||||
if(ioservice_active) \
|
if(ioservice_active) \
|
||||||
{ \
|
{ \
|
||||||
work.reset(); \
|
work.reset(); \
|
||||||
|
while (!ioservice.stopped()) ioservice.poll(); \
|
||||||
threadpool.join_all(); \
|
threadpool.join_all(); \
|
||||||
ioservice.stop(); \
|
ioservice.stop(); \
|
||||||
ioservice_active = false; \
|
ioservice_active = false; \
|
||||||
|
@ -73,6 +73,7 @@ using namespace cryptonote;
|
|||||||
#define KILL_IOSERVICE() \
|
#define KILL_IOSERVICE() \
|
||||||
do { \
|
do { \
|
||||||
work.reset(); \
|
work.reset(); \
|
||||||
|
while (!ioservice.stopped()) ioservice.poll(); \
|
||||||
threadpool.join_all(); \
|
threadpool.join_all(); \
|
||||||
ioservice.stop(); \
|
ioservice.stop(); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user