|
NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
|
线程退出通知器 更多...
#include <thread_exit_notifier.hpp>
静态 Public 成员函数 | |
| static void | subscribe (thread_exit_listener *listener) |
| 注册线程退出监听器 | |
| static void | unsubscribe (thread_exit_listener *listener) |
| 注销线程退出监听器 | |
线程退出通知器
利用 thread_local 对象的析构函数在线程退出时通知所有注册的监听器。 每个线程拥有独立的 thread_exit_notifier 实例。
在文件 thread_exit_notifier.hpp 第 38 行定义.
|
static |
注册线程退出监听器
| listener | 要注册的监听器 |
|
static |
注销线程退出监听器
| listener | 要注销的监听器 |