#include "dcpomatic_log.h"
#include "encoded_log_entry.h"
#include "version.h"
+#include "warnings.h"
#include <dcp/raw_convert.h>
#include <libcxml/cxml.h>
+DCPOMATIC_DISABLE_WARNINGS
#include <libxml++/libxml++.h>
+DCPOMATIC_ENABLE_WARNINGS
#include <boost/algorithm/string.hpp>
#include <boost/scoped_array.hpp>
#include <boost/foreach.hpp>
_full_condition.notify_all ();
}
- BOOST_FOREACH (boost::thread* i, _worker_threads) {
- try {
- i->join ();
- } catch (...) {
-
- }
- delete i;
- }
+ try {
+ _worker_threads.join_all ();
+ } catch (...) {}
{
boost::mutex::scoped_lock lm (_broadcast.mutex);
}
for (int i = 0; i < _num_threads; ++i) {
- boost::thread* t = new thread(bind(&EncodeServer::worker_thread, this));
- _worker_threads.push_back (t);
+ boost::thread* t = _worker_threads.create_thread (bind(&EncodeServer::worker_thread, this));
#ifdef DCPOMATIC_LINUX
pthread_setname_np (t->native_handle(), "encode-server-worker");
#endif