void(* cwist_job_func)(void *arg)
Job function signature.
struct cwist_io_queue cwist_io_queue
Opaque handle for the IO Queue. Backend implementation depends on OS (io_uring, kqueue,...
void cwist_io_queue_run(cwist_io_queue *q)
Run the event loop. Blocks indefinitely, processing jobs as they complete/trigger.
void cwist_io_queue_stop(cwist_io_queue *q)
Request that all runners stop processing without freeing the queue.
void cwist_io_queue_destroy(cwist_io_queue *q)
Destroy the queue and free resources.
cwist_io_queue * cwist_io_queue_create(size_t capacity)
Initialize the job queue.
bool cwist_io_queue_submit(cwist_io_queue *q, cwist_job_func func, void *arg)
Submit a job to be executed asynchronously.