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();
|
||||
|
||||
for (auto& worker : workers_)
|
||||
if (worker.joinable())
|
||||
worker.join();
|
||||
pthread_kill(worker.native_handle(), SIGTERM);
|
||||
}
|
||||
|
||||
std::function<void(std::function<void()>)> Runtime::to_dispatcher_functional()
|
||||
|
|
|
|||
|
|
@ -48,8 +48,7 @@ public:
|
|||
// the size configured at creation time.
|
||||
void start();
|
||||
|
||||
// stop cleanly shuts down a Runtime instance,
|
||||
// joining all worker threads.
|
||||
// stop cleanly shuts down a Runtime instance.
|
||||
void stop();
|
||||
|
||||
// to_dispatcher_functional returns a function for integration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue