> make
Result: libft_thpool.a
int count
- number of threads
char flag
- TP_ON_EXEC
(execute pool on new task adding) or TP_ON_START
(execution on pool creating)
t_tp_thread *tp_create(int count, char flag);
t_tp_thread *queue
- pthread pool
void *(*f)(void *)
- task, that need to execute on pool
void *data
- argument for void *(*f)(void *)
function
int tp_exec_queue_add(t_tp_thread *queue, void *(*f)(void *), void *data);
t_tp_thread *queue
- pthread pool
int tp_wait_for_queue(t_tp_thread *queue);
int tp_get_nbr_proc(void);