Man page - q_job_seek(3)

Packages contains this manual

Manual

Q_JOB_SEEK

NAME
LIBRARY
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
SEE ALSO

NAME

q_job_seek - wait for and execute jobs from a smolq queue

LIBRARY

Librecast library ( liblibrecast , -llibrecast )

SYNOPSIS

#include <librecast/q.h>

void *q_job_seek(void *arg );

Compile and link with -llibrecast .

DESCRIPTION

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.

SEE ALSO

q_pool_create (3), q_pool_destroy (3), q_init (3), q_free (3), q_push (3), q_wait (3), sem_wait (3), pthread_cancel (3), pthread_create (3)