There are predefined interruption points for boost::thread
: https://www.boost.org/doc/libs/1_71_0/doc/html/thread/thread_management.html#interruption_points
However, non-boost threads such as std::thread
or the main()
thread can obviously not be interrupted. So remove all unused boost/thread from methods that are never executed in a boost::thread
.
Most of them were accompanied by a ShutdownRequested
anyway. So even if the current thread was a boost::thread
, the interruption point would be redundant. (We only interrupt threads during shutdown)