Is a boost::thread automatically removed from a boost::thread_group when it terminates?

…衆ロ難τιáo~ 提交于 2019-12-03 12:39:40
Lightness Races with Monica

No, I misinterpreted the results of my test by not abstracting away the task scheduler that creates threads for me. In short, I was checking size() on the wrong boost::thread_group.

In fact, boost::thread_group::size() doesn't go down on its own as threads terminate, so I'll be using an adapted version of the solution provided in the forum post I linked to in the question update.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!