
10 Dec
2013
10 Dec
'13
10:29 a.m.
void ThreadRun(boost::function
const &job) { boost::thread thr = boost::thread(job); thr.detach(); // Not really necessary, but it does make it explicit that we'll never wait for the thread to finish }
Note that detaching or joining *is* necessary since v2 - otherwise thread object destructor would call std::terminate(): http://www.boost.org/doc/libs/1_55_0/doc/html/thread/thread_management.html#...