libcmutils 0.6.5
Multi-platform C99 utility library
Loading...
Searching...
No Matches
CMUTIL_ThreadPool Struct Reference

A threadpool object. More...

Data Fields

void(* Execute )(CMUTIL_ThreadPool *tp, CMProcCB runnable, void *udata)
 Execute a job in this threadpool.
 
void(* Wait )(CMUTIL_ThreadPool *tp)
 Wait until all jobs are finished.
 
void(* Destroy )(CMUTIL_ThreadPool *tp)
 Destroy all resources related with this object.
 

Detailed Description

A threadpool object.

Field Documentation

◆ Execute

void(* CMUTIL_ThreadPool::Execute) (CMUTIL_ThreadPool *tp, CMProcCB runnable, void *udata)

Execute a job in this threadpool.

This method will return immediately. Job will be queued and executed when any idle thread is available in this pool.

Parameters
tpThis threadpool object.
runnableA callback function to be executed.
udataUser data object which would be passed to the runnable callback function.

◆ Wait

void(* CMUTIL_ThreadPool::Wait) (CMUTIL_ThreadPool *tp)

Wait until all jobs are finished.

Parameters
tpThis threadpool object

◆ Destroy

void(* CMUTIL_ThreadPool::Destroy) (CMUTIL_ThreadPool *tp)

Destroy all resources related with this object.

Parameters
tpThis threadpool object

The documentation for this struct was generated from the following file: