summaryrefslogtreecommitdiff
path: root/src/lib/encode_server.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-02-19 22:22:23 +0100
committerCarl Hetherington <cth@carlh.net>2020-02-19 22:22:23 +0100
commitf515b8daea9d28200be803bb64ff17e9f30343c4 (patch)
treed6b31353d8daa9452d9def043335280d7792b41d /src/lib/encode_server.cc
parent5b1b70c86df7225a2a102bdde3b38ea591a6dcbb (diff)
Another macOS std::list boost::thread SNAFU.
Diffstat (limited to 'src/lib/encode_server.cc')
-rw-r--r--src/lib/encode_server.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/encode_server.cc b/src/lib/encode_server.cc
index e79f82b62..5884df09a 100644
--- a/src/lib/encode_server.cc
+++ b/src/lib/encode_server.cc
@@ -87,12 +87,13 @@ EncodeServer::~EncodeServer ()
_full_condition.notify_all ();
}
- BOOST_FOREACH (boost::thread& i, _worker_threads) {
+ BOOST_FOREACH (boost::thread* i, _worker_threads) {
try {
- i.join ();
+ i->join ();
} catch (...) {
}
+ delete i;
}
{
@@ -233,9 +234,10 @@ EncodeServer::run ()
}
for (int i = 0; i < _num_threads; ++i) {
- _worker_threads.push_back (thread(bind(&EncodeServer::worker_thread, this)));
+ boost::thread* t = new thread(bind(&EncodeServer::worker_thread, this));
+ _worker_threads.push_back (t);
#ifdef DCPOMATIC_LINUX
- pthread_setname_np (_worker_threads.back().native_handle(), "encode-server-worker");
+ pthread_setname_np (t->native_handle(), "encode-server-worker");
#endif
}