Legofit
infers population history from nucleotide site patterns.
Functions
jobqueue.h File Reference

Header for jobqueue.c. More...

Go to the source code of this file.

Functions

JobQueueJobQueue_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.
 

Detailed Description

Header for jobqueue.c.

Author
Alan R. Rogers

Function Documentation

◆ JobQueue_addJob()

void JobQueue_addJob ( JobQueue jq,
int(*)(void *, void *)  jobfun,
void *  param 
)

Add a job to the queue.

Parameters
jqthe JobQueue
jobfunfunction 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.
parampointer to structure with parameters for this job