![]() |
Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
|
Data Structures | |
struct | TPool_s |
Functions | |
TPool * | TPool_create (int numThreads, int queueSize) |
void | TPool_free (TPool *ctx) |
void | TPool_submitJob (TPool *ctx, void(*job_function)(void *), void *arg) |
void | TPool_jobsCompleted (TPool *ctx) |
TPool_create() : Create a thread pool with at most @nbThreads. @nbThreads must be at least 1. @queueSize is the maximum number of pending jobs before blocking.
void TPool_free | ( | TPool * | ctx | ) |
TPool_free() : Free a thread pool returned by TPool_create(). Waits for the completion of running jobs before freeing resources.
void TPool_jobsCompleted | ( | TPool * | ctx | ) |
TPool_jobsCompleted() : Blocks until all queued jobs are completed.
void TPool_submitJob | ( | TPool * | ctx, |
void(* | job_function )(void *), | ||
void * | arg ) |
TPool_submitJob() : Add @job_function(arg) to the thread pool. @ctx must be valid. Invocation can block if queue is full. Note: Ensure