Legofit
infers population history from nucleotide site patterns.
|
Header for jobqueue.c. More...
Go to the source code of this file.
Functions | |
JobQueue * | JobQueue_new (int nthreads, void *threadData, void *(*ThreadState_new)(void *), void(*ThreadState_free)(void *)) |
Construct a JobQueue. | |
void | JobQueue_addJob (JobQueue *jq, int(*jobfun)(void *, void *), void *param) |
Add a job to the queue. More... | |
void | JobQueue_noMoreJobs (JobQueue *jq) |
Stop accepting jobs. | |
void | JobQueue_waitOnJobs (JobQueue *jq) |
Wait until all threads are idle. | |
void | JobQueue_free (JobQueue *jq) |
Destroy a JobQueue. | |
Header for jobqueue.c.
void JobQueue_addJob | ( | JobQueue * | jq, |
int(*)(void *, void *) | jobfun, | ||
void * | param | ||
) |
Add a job to the queue.
jq | the JobQueue |
jobfun | function to be executed. Takes two void* arguments. The first points to a structure containing data associated with this job. The second points to data associated with the thread that runs the job. For example, the 2nd argument can be used to maintain a separate random number generator within each thread. |
param | pointer to structure with parameters for this job |