mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-27 13:23:29 +01:00
ringct: always shutdown the boost io service
Even if no worker threads were started, it needs shutting down or it will cause an invalid access in the io service thread
This commit is contained in:
parent
18e406a0e6
commit
836669d276
@ -772,7 +772,7 @@ namespace rct {
|
|||||||
threads = std::min(threads, rv.outPk.size());
|
threads = std::min(threads, rv.outPk.size());
|
||||||
for (size_t i = 0; i < threads; ++i)
|
for (size_t i = 0; i < threads; ++i)
|
||||||
threadpool.create_thread(boost::bind(&boost::asio::io_service::run, &ioservice));
|
threadpool.create_thread(boost::bind(&boost::asio::io_service::run, &ioservice));
|
||||||
bool ioservice_active = threads > 1;
|
bool ioservice_active = true;
|
||||||
std::deque<bool> results(rv.outPk.size(), false);
|
std::deque<bool> results(rv.outPk.size(), false);
|
||||||
epee::misc_utils::auto_scope_leave_caller ioservice_killer = epee::misc_utils::create_scope_leave_handler([&]() { KILL_IOSERVICE(); });
|
epee::misc_utils::auto_scope_leave_caller ioservice_killer = epee::misc_utils::create_scope_leave_handler([&]() { KILL_IOSERVICE(); });
|
||||||
|
|
||||||
@ -838,7 +838,7 @@ namespace rct {
|
|||||||
threads = std::min(threads, rv.outPk.size());
|
threads = std::min(threads, rv.outPk.size());
|
||||||
for (size_t i = 0; i < threads; ++i)
|
for (size_t i = 0; i < threads; ++i)
|
||||||
threadpool.create_thread(boost::bind(&boost::asio::io_service::run, &ioservice));
|
threadpool.create_thread(boost::bind(&boost::asio::io_service::run, &ioservice));
|
||||||
bool ioservice_active = threads > 1;
|
bool ioservice_active = true;
|
||||||
std::deque<bool> results(rv.outPk.size(), false);
|
std::deque<bool> results(rv.outPk.size(), false);
|
||||||
epee::misc_utils::auto_scope_leave_caller ioservice_killer = epee::misc_utils::create_scope_leave_handler([&]() { KILL_IOSERVICE(); });
|
epee::misc_utils::auto_scope_leave_caller ioservice_killer = epee::misc_utils::create_scope_leave_handler([&]() { KILL_IOSERVICE(); });
|
||||||
|
|
||||||
@ -880,7 +880,7 @@ namespace rct {
|
|||||||
threads = std::min(threads, rv.mixRing.size());
|
threads = std::min(threads, rv.mixRing.size());
|
||||||
for (size_t i = 0; i < threads; ++i)
|
for (size_t i = 0; i < threads; ++i)
|
||||||
threadpool.create_thread(boost::bind(&boost::asio::io_service::run, &ioservice));
|
threadpool.create_thread(boost::bind(&boost::asio::io_service::run, &ioservice));
|
||||||
bool ioservice_active = threads > 1;
|
bool ioservice_active = true;
|
||||||
std::deque<bool> results(rv.mixRing.size(), false);
|
std::deque<bool> results(rv.mixRing.size(), false);
|
||||||
epee::misc_utils::auto_scope_leave_caller ioservice_killer = epee::misc_utils::create_scope_leave_handler([&]() { KILL_IOSERVICE(); });
|
epee::misc_utils::auto_scope_leave_caller ioservice_killer = epee::misc_utils::create_scope_leave_handler([&]() { KILL_IOSERVICE(); });
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user