1#ifndef NEFORCE_CORE_ASYNC_THREAD_EXIT_NOTIFIER_HPP__
2#define NEFORCE_CORE_ASYNC_THREAD_EXIT_NOTIFIER_HPP__
4NEFORCE_BEGIN_NAMESPACE__
38class NEFORCE_API thread_exit_notifier {
43 thread_exit_notifier()
noexcept =
default;
44 ~thread_exit_notifier();
46 static thread_exit_notifier& instance()
noexcept;
49 thread_exit_notifier(
const thread_exit_notifier&) =
delete;
50 thread_exit_notifier& operator=(
const thread_exit_notifier&) =
delete;
69NEFORCE_END_NAMESPACE__
static void subscribe(thread_exit_listener *listener)
注册线程退出监听器
static void unsubscribe(thread_exit_listener *listener)
注销线程退出监听器
void(*)(void *) thread_exit_callback_t
线程退出回调类型
void * user_data
回调函数的用户数据
thread_exit_callback_t callback
线程退出时的回调函数
thread_exit_listener * next
监听器链表下一节点
void * chain
所属 thread_exit_notifier 指针