From 4e9f7804c95a7842a4e905aca64f42c06c033fdc Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Thu, 2 Oct 2014 13:10:20 +0300 Subject: [PATCH] core: switch thread_pool to posix_thread std::thread allocates, which interferes with the seastar memory allocator, which doesn't support allocation in worker threads. --- core/reactor.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/reactor.hh b/core/reactor.hh index f8195e252b..4f8156f424 100644 --- a/core/reactor.hh +++ b/core/reactor.hh @@ -28,6 +28,7 @@ #include #include #include "util/eclipse.hh" +#include "linux_thread.hh" #include "future.hh" #include "posix.hh" #include "apply.hh" @@ -381,7 +382,7 @@ private: class thread_pool { inter_thread_work_queue inter_thread_wq; - std::thread _worker_thread; + posix_thread _worker_thread; std::atomic _stopped = { false }; public: thread_pool() : _worker_thread([this] { work(); }) { inter_thread_wq.start(); }