提交 1fb98d21 编写于 作者: S Simon Fels

Don't join worker instances but hard stop them

上级 57edcc0e
...@@ -77,8 +77,7 @@ void Runtime::stop() { ...@@ -77,8 +77,7 @@ void Runtime::stop() {
service_.stop(); service_.stop();
for (auto& worker : workers_) for (auto& worker : workers_)
if (worker.joinable()) pthread_kill(worker.native_handle(), SIGTERM);
worker.join();
} }
std::function<void(std::function<void()>)> Runtime::to_dispatcher_functional() std::function<void(std::function<void()>)> Runtime::to_dispatcher_functional()
......
...@@ -48,8 +48,7 @@ public: ...@@ -48,8 +48,7 @@ public:
// the size configured at creation time. // the size configured at creation time.
void start(); void start();
// stop cleanly shuts down a Runtime instance, // stop cleanly shuts down a Runtime instance.
// joining all worker threads.
void stop(); void stop();
// to_dispatcher_functional returns a function for integration // to_dispatcher_functional returns a function for integration
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册