Q_JOB_SEEK(3)
β¨ q_job_seek(3) β¨
okay bestie, welcome to the Librecast Programmer's Manual, section 3, and today's main character is q_job_seek π
π 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 πΈ
so the q_job_seek() function does one thing and it does it iconically: it atomically fetches the next job in q and executes it, then loops around and does it all over again. like a lil worker bee that never gets tired πβ¨
This is meant to be used as the start_routine for pthread_create(3), or as the function f when you're calling q_pool_create(3). that's literally its whole purpose, iykyk π«Ά
The function loops indefinitely until the thread gets cancelled with pthread_cancel(3) or with q_pool_destroy(3). no cap, it will just keep going forever until somebody stops it π
π«§ RETURN VALUE π«§
q_job_seek() returns the same pointer arg that was passed to it. that's it. that's the return value. give it back exactly what you got, king π
π ERRORS π
None. not a single one. she simply does not error π
π 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)
and that's the whole page bestie, slay π β¨
this lil masterpiece came from LIBRECAST and it's dated 2023-07-23 β go read the other pages, ily, bye ππ¦π
π¦ where this page comes from
- debian trixie: liblibrecast-dev 0.9.1-1 Β· GPL-2.0-only OR GPL-3.0-only
- nixos 26.05: librecast 0.11.2
- nixpkgs unstable: librecast 0.11.2
- ubuntu noble: liblibrecast-dev 0.8.0-1.1build1 Β· GPL-2.0-only OR GPL-3.0-only
- ubuntu questing: liblibrecast-dev 0.9.1-1
- ubuntu resolute: liblibrecast-dev 0.11.2-2 Β· GPL-2.0-only OR GPL-3.0-only
- ubuntu stonking: liblibrecast-dev 0.11.2-2build1 Β· GPL-2.0-only OR GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms