Boost C++ 库

...世界上最受推崇和设计精良的 C++ 库项目之一。 Herb SutterAndrei Alexandrescu,《C++ 编码规范

strand::running_in_this_thread - Boost C++ 函数库
PrevUpHomeNext

确定该 strand 是否正在当前线程中运行。

bool running_in_this_thread() const;
返回值

true 如果当前线程正在执行通过 post()dispatch()defer() 提交到该 strand 的函数。否则返回 false


PrevUpHomeNext