logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

q_job_seek - wait for and execute jobs from a smolq queue

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

Errors

       None.

Library

       Librecast library (liblibrecast, -llibrecast)

Name

       q_job_seek - wait for and execute jobs from a smolq queue

Return Value

       The q_job_seek() function returns the same pointer arg that was passed to it.

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)

LIBRECAST                                          2023-07-23                                      Q_JOB_SEEK(3)

Synopsis

#include<librecast/q.h>void*q_job_seek(void*arg);

       Compile and link with -llibrecast.

See Also