mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-23 10:00:35 +00:00
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:
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user