Changeset 18617
- Timestamp:
- 09/18/16 11:16:18 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilderWrapper.h
r18266 r18617 352 352 bool IsThreadRunning() 353 353 { 354 if (fThreadMain.get_id()==boost::this_thread::get_id()) 355 return true; 356 return !fThreadMain.timed_join(boost::posix_time::microseconds(0)); 354 return fThreadMain.joinable(); 357 355 } 358 356 … … 382 380 383 381 fThreadMain = boost::thread(StartEvtBuild); 382 383 // Run a detached thread which ensures that our thread 384 // is joined so that it is not joinable anymore once 385 // it is finished (I think this is similar to 386 // boost::thread_guard, but I could not figure out 387 // how it works) 388 std::thread([this] { this->fThreadMain.join(); }).detach(); 384 389 } 385 390
Note:
See TracChangeset
for help on using the changeset viewer.