Don't join worker instances but hard stop them

This commit is contained in:
Simon Fels 2016-11-08 07:37:23 +01:00
commit 1fb98d2103
2 changed files with 2 additions and 4 deletions

View file

@ -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()

View file

@ -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