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.
This commit is contained in:
Avi Kivity
2014-10-02 13:10:20 +03:00
parent 50c4dcbd5f
commit 4e9f7804c9

View File

@@ -28,6 +28,7 @@
#include <boost/optional.hpp>
#include <boost/program_options.hpp>
#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<bool> _stopped = { false };
public:
thread_pool() : _worker_thread([this] { work(); }) { inter_thread_wq.start(); }