q_job_seek3
Wait for and execute jobs from a smolq queue
Usage
#include <librecast/q.h>
void *q_job_seek(void *arg);
Compile and link with -llibrecast.
Library
Librecast library (liblibrecast, -llibrecast)
Overview
The q_job_seek() function atomically fetches the next job in q and executes it before looping and repeating. This is intended to be used as the start_routine for pthread_create(3) or used as the function f when calling q_pool_create(3).
The function loops indefinitely until the thread is cancelled with pthread_cancel(3) or q_pool_destroy(3).
Return value
The q_job_seek() function returns the same pointer arg that was passed to it.
Errors
None.