boost::this_thread_interruption_point 的标准替代品
std alternative to boost::this_thread_interruption_point
我正在开发一个使用 boost 1.61 的 C++ 项目,我正在用 std 调用替换 boost,是否有替代 boost::this_thread::interruption_point() 的方法?
std::thread
不可中断。你可以阅读更多关于这个 here. However there is std::jthread in C++-20, that you can try to use. Unfortunately, according to compiler-support list on cpp-reference,只有 libstdc++ 10+ 支持 std::jthread
.
我正在开发一个使用 boost 1.61 的 C++ 项目,我正在用 std 调用替换 boost,是否有替代 boost::this_thread::interruption_point() 的方法?
std::thread
不可中断。你可以阅读更多关于这个 here. However there is std::jthread in C++-20, that you can try to use. Unfortunately, according to compiler-support list on cpp-reference,只有 libstdc++ 10+ 支持 std::jthread
.