【发布时间】:2018-05-07 06:15:03
【问题描述】:
例如
boost::thread th = boost::thread(a_lengthy_function);
th.detach();
th = boost::thread(another_function);
第一个线程会被第二个线程取消或影响吗?
【问题讨论】:
-
旁注:考虑使用
std::thread -
考虑分离线程的作用。如果句柄仍然以某种方式影响分离的线程,那将是非常特殊的。