Lely core libraries  2.2.5
ev_loop Struct Reference

A polling event loop. More...

Collaboration diagram for ev_loop:

Data Fields

ev_poll_tpoll
 A pointer to the interface used to poll for events (can be NULL).
 
size_t npoll
 The number of threads allowed to poll simultaneously. More...
 
const struct ev_std_exec_impl_vtblimpl_vptr
 A pointer to the virtual table containing the interface used by the standard executor (exec).
 
struct ev_std_exec exec
 The executor corresponding to the event loop.
 
mtx_t mtx
 The mutex protecting the task queue.
 
struct sllist queue
 The queue of pending tasks.
 
struct ev_task task
 The task used to trigger polling.
 
atomic_size_t ntasks
 The number of pending tasks. More...
 
int stopped
 A flag specifying whether the event loop is stopped.
 
struct dllist waiting
 The list of waiting contexts.
 
struct dllist polling
 The list of polling contexts.
 
size_t npolling
 The number of polling contexts.
 
struct ev_loop_ctxunused
 The list of unused contexts.
 
size_t nunused
 The number of unused contexts. More...
 

Detailed Description

A polling event loop.

Definition at line 138 of file loop.c.

Field Documentation

◆ npoll

size_t ev_loop::npoll

The number of threads allowed to poll simultaneously.

If npoll is 0, there is no limit.

Definition at line 145 of file loop.c.

◆ ntasks

atomic_size_t ev_loop::ntasks

The number of pending tasks.

This equals the number tasks in queue plus the number of calls to ev_exec_on_task_init() minus those to ev_exec_on_task_fini(). ev_loop_stop() is called once this value reaches 0.

Definition at line 174 of file loop.c.

◆ nunused

size_t ev_loop::nunused

The number of unused contexts.

This WILL NOT exceed LELY_EV_LOOP_CTX_MAX_UNUSED.

Definition at line 192 of file loop.c.


The documentation for this struct was generated from the following file: