MCPcopy Create free account
hub / github.com/Amanieu/asyncplusplus / get_thread_wait_handler

Function get_thread_wait_handler

src/scheduler.cpp:111–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111static wait_handler get_thread_wait_handler()
112{
113#if defined(EMULATE_PTHREAD_THREAD_LOCAL)
114 // we need to call this here, because the pthread initializer is lazy,
115 // this means the it could be null and we need to set it before trying to
116 // get or set it
117 wait_handler handler = (wait_handler) pthread_getspecific(get_thread_wait_handler_key());
118 if(handler == nullptr) {
119 return generic_wait_handler;
120 }
121 return handler;
122#else
123 return thread_wait_handler;
124#endif
125}
126
127// Wait for a task to complete
128void wait_for_task(task_base* wait_task)

Callers 2

wait_for_taskFunction · 0.85
set_thread_wait_handlerFunction · 0.85

Calls 1

Tested by

no test coverage detected