summaryrefslogtreecommitdiff
path: root/src/lib/server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/server.cc')
-rw-r--r--src/lib/server.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/server.cc b/src/lib/server.cc
index 260f2e469..dd076a049 100644
--- a/src/lib/server.cc
+++ b/src/lib/server.cc
@@ -81,15 +81,17 @@ Server::~Server ()
_full_condition.notify_all ();
}
- for (vector<boost::thread*>::iterator i = _worker_threads.begin(); i != _worker_threads.end(); ++i) {
- (*i)->join ();
- delete *i;
+ BOOST_FOREACH (boost::thread* i, _worker_threads) {
+ DCPOMATIC_ASSERT (i->joinable ());
+ i->join ();
+ delete i;
}
_io_service.stop ();
_broadcast.io_service.stop ();
if (_broadcast.thread) {
+ DCPOMATIC_ASSERT (_broadcast.thread->join ());
_broadcast.thread->join ();
}
}