Don't join worker instances but hard stop them
This commit is contained in:
parent
57edcc0ec7
commit
1fb98d2103
2 changed files with 2 additions and 4 deletions
|
|
@ -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:
|
||||||
// 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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue