Attempt to fix the tsan build

Deliberately leak the shared thread pool to avoid shutdown dtor registration
and tsan complaints at exit.
This commit is contained in:
ridiculousfish 2020-12-31 17:03:53 -08:00
parent 66c2266ed1
commit 792abf61ec

View file

@ -131,7 +131,8 @@ struct thread_pool_t {
/// The thread pool for "iothreads" which are used to lift I/O off of the main thread.
/// These are used for completions, etc.
static thread_pool_t s_io_thread_pool(1, IO_MAX_THREADS);
/// Leaked to avoid shutdown dtor registration (including tsan).
static thread_pool_t &s_io_thread_pool = *(new thread_pool_t(1, IO_MAX_THREADS));
static owning_lock<std::queue<void_function_t>> s_result_queue;