Skip to content

MTY_ThreadPoolPoll

chrisd1100 edited this page Aug 25, 2022 · 1 revision

Poll the asynchronous state of a thread in a pool.

MTY_Async MTY_ThreadPoolPoll(
    MTY_ThreadPool * ctx,
    uint32_t         index,
    void **          opaque
);

Parameters

ctx (MTY_ThreadPool *)

An MTY_ThreadPool.

index (uint32_t)

Thread index returned by MTY_ThreadPoolCreate.

opaque (void **)

Thread state set via the opaque argument to MTY_ThreadPoolCreate.

Return value

MTY_Async

MTY_ASYNC_OK means the request has finished and opaque has been set to the value originally passed via MTY_ThreadPoolDispatch.

MTY_ASYNC_DONE means there is no thread running at index.

MTY_ASYNC_CONTINUE means the thread is still executing.

Platform support

Windows   macOS   Android   Linux  

See also

Module: Thread

Clone this wiki locally