|
Zen API
|
| kStatus kThreadPool_BeginExecute | ( | kThreadPool | pool, |
| kThreadFx | entryFx, | ||
| kPointer | context, | ||
| kThreadPoolTransaction * | transaction | ||
| ) |
Schedules the specified callback for execution on the thread pool.
The transaction argument can optionally receive a transaction handle that can be used to wait for callback completion. If the transaction argument is not kNULL, kThreadPool_EndExecute must be used to wait for transaction completion; otherwise, leaks will result.
This method is thread-safe.
| pool | Thread pool object. |
| entryFx | Function to execute. |
| context | Context parameter for callback function. |
| transaction | Optionally receives a transaction handle; if received, must be passed to kThreadPool_EndExecute. |