EncodeServer::~EncodeServer ()
{
+ boost::this_thread::disable_interruption dis;
+
{
boost::mutex::scoped_lock lm (_mutex);
_terminate = true;
}
_broadcast.io_service.stop ();
- if (_broadcast.thread.joinable()) {
- try {
- _broadcast.thread.join ();
- } catch (...) {
-
- }
- }
+ try {
+ _broadcast.thread.join ();
+ } catch (...) {}
}
/** @param after_read Filled in with gettimeofday() after reading the input from the network.
}
for (int i = 0; i < _num_threads; ++i) {
- boost::thread* t = _worker_threads.create_thread (bind(&EncodeServer::worker_thread, this));
#ifdef DCPOMATIC_LINUX
+ boost::thread* t = _worker_threads.create_thread (bind(&EncodeServer::worker_thread, this));
pthread_setname_np (t->native_handle(), "encode-server-worker");
+#else
+ _worker_threads.create_thread (bind(&EncodeServer::worker_thread, this));
#endif
}