thrJobWait

Wait for the next job to completed

Description:

Each consecutive call to this function return the integer identifier for a completed job, in the order in which they are completed. If all completed jobs have already been reported, then this function blocks until the next job is completed.

Note, only jobs which had the THR__REPORT_JOB flag set when calling thrAddJob and were created within the current job context (see thrBeginJobContext) are included in the list of returned jobs.

Invocation

int thrJobWait( ThrWorkForce workforce, int status )

Arguments

workforce
Pointer to the workforce. If NULL is supplied, this function exits immediately, returning a value of zero.
status
Pointer to the inherited status value.

Returned Value

The integer identifier for the completed job. This can be compared
with the job identifiers returned by thrAddJob to determine which
job has finished. A value of -1 is returned if the workforce has no
no remining jobs.

Notes: