-
Notifications
You must be signed in to change notification settings - Fork 56
MTY_ThreadPoolDetach
chrisd1100 edited this page Aug 25, 2022
·
1 revision
Allow a thread to be reused after it has finished executing.
This function may be called while the thread is executing or after it has already been set to MTY_ASYNC_OK
. In either case, the thread is allowed to be reused via MTY_ThreadPoolDispatch
as soon as it is no longer executing.
void MTY_ThreadPoolDetach(
MTY_ThreadPool * ctx,
uint32_t index,
MTY_AnonFunc detach
);
ctx
(MTY_ThreadPool *
)
An MTY_ThreadPool
.
index
(uint32_t
)
Thread index returned by MTY_ThreadPoolCreate
.
detach
(MTY_AnonFunc
)
Function called to clean up opaque
thread state set via MTY_ThreadPoolDispatch
after the thread is done executing. May be NULL
if not applicable.