# HG changeset patch # User Sebastien Jodogne # Date 1495622528 -7200 # Node ID 0aef120d7e1c803378cb0a4d741b71d1af151231 # Parent f0dd03210372eae769efc89fef132c1c86668cc6 fix for older versions of boost diff -r f0dd03210372 -r 0aef120d7e1c Framework/Toolbox/OrthancAsynchronousWebService.cpp --- a/Framework/Toolbox/OrthancAsynchronousWebService.cpp Wed May 24 12:35:07 2017 +0200 +++ b/Framework/Toolbox/OrthancAsynchronousWebService.cpp Wed May 24 12:42:08 2017 +0200 @@ -109,7 +109,7 @@ boost::mutex mutex_; State state_; Orthanc::WebServiceParameters orthanc_; - std::vector threads_; + std::vector threads_; Orthanc::SharedMessageQueue queue_; static void Worker(PImpl* that) @@ -125,7 +125,6 @@ state = that->state_; } - printf("."); fflush(stdout); if (state == State_Stopped) { break; @@ -200,7 +199,7 @@ for (size_t i = 0; i < threads_.size(); i++) { - threads_[i] = boost::thread(Worker, this); + threads_[i] = new boost::thread(Worker, this); } state_ = State_Started; @@ -221,10 +220,14 @@ for (size_t i = 0; i < threads_.size(); i++) { - if (threads_[i].joinable()) + assert(threads_[i] != NULL); + + if (threads_[i]->joinable()) { - threads_[i].join(); + threads_[i]->join(); } + + delete threads_[i]; } } };