Legofit
infers population history from nucleotide site patterns.
jobqueue.h
Go to the documentation of this file.
1
10#ifndef ARR_JOBQUEUE
11# define ARR_JOBQUEUE
12
13typedef struct JobQueue JobQueue;
14
15JobQueue *JobQueue_new(int nthreads, void *threadData,
16 void *(*ThreadState_new) (void *),
17 void (*ThreadState_free) (void *));
19 int (*jobfun) (void *, void *), void *param);
22void JobQueue_free(JobQueue * jq);
23#endif
void JobQueue_addJob(JobQueue *jq, int(*jobfun)(void *, void *), void *param)
Add a job to the queue.
Definition: jobqueue.c:152
JobQueue * JobQueue_new(int nthreads, void *threadData, void *(*ThreadState_new)(void *), void(*ThreadState_free)(void *))
Construct a JobQueue.
Definition: jobqueue.c:108
void JobQueue_waitOnJobs(JobQueue *jq)
Wait until all threads are idle.
Definition: jobqueue.c:362
void JobQueue_noMoreJobs(JobQueue *jq)
Stop accepting jobs.
Definition: jobqueue.c:324
void JobQueue_free(JobQueue *jq)
Destroy a JobQueue.
Definition: jobqueue.c:421
All data used by job queue.
Definition: jobqueue.c:61