Removing workaround for coroutines in combination with sanitizers as coroutines are no longer used.

This commit is contained in:
clemahieu 2021-08-08 17:25:53 +01:00
commit a1598c9722
No known key found for this signature in database
GPG key ID: 43708520C8DFB938

View file

@ -123,8 +123,7 @@ nano::thread_runner::thread_runner (boost::asio::io_context & io_ctx_a, unsigned
{
boost::thread::attributes attrs;
nano::thread_attributes::set (attrs);
auto count = (is_sanitizer_build && nano::network_constants{}.is_dev_network ()) ? 1 : service_threads_a; // This is a workaround to a bad interaction between TSAN, multiple coroutines, and multiple threads servicing io_context. Only use 1 thread if sanitizers are attached
for (auto i (0u); i < count; ++i)
for (auto i (0u); i < service_threads_a; ++i)
{
threads.emplace_back (attrs, [&io_ctx_a] () {
nano::thread_role::set (nano::thread_role::name::io);