Boost C++ 库

...世界上最受推崇、设计最精良的 C++ 库项目之一。 Herb SutterAndrei Alexandrescu, C++ Coding Standards

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

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

bool running_in_this_thread() const;
返回值

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


PrevUpHomeNext