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

Function create_threadpool_data

src/threadpool_scheduler.cpp:123–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121#endif
122
123static void create_threadpool_data(threadpool_data* owning_threadpool_, std::size_t thread_id_)
124{
125#if defined(EMULATE_PTHREAD_THREAD_LOCAL)
126 // the memory allocated here gets deallocated by the lambda declared on the key creation
127 pthread_setspecific(get_local_threadpool_data_key(), new threadpool_data_wrapper(owning_threadpool_, thread_id_));
128#else
129 owning_threadpool = owning_threadpool_;
130 thread_id = thread_id_;
131#endif
132}
133
134static threadpool_data_wrapper get_threadpool_data_wrapper()
135{

Callers 1

worker_threadFunction · 0.85

Calls 1

Tested by

no test coverage detected