Lely core libraries  2.2.5
io_fd_loop Struct Reference

A file descriptor event loop. More...

Collaboration diagram for io_fd_loop:

Data Fields

io_poll_tpoll
 A pointer to the I/O polling instance used to monitor the event loop.
 
struct io_svc svc
 The I/O service representing the event loop.
 
io_ctx_tctx
 A pointer to the I/O context with which the event loop is registered.
 
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.
 
struct io_poll_watch watch
 The object used to monitor the file descriptor for I/O events.
 
int fd [2]
 The file descriptor corresponding to the event loop.
 
pthread_mutex_t mtx
 The mutex protecting the task queue.
 
size_t ntasks
 The number of pending tasks. More...
 
struct sllist queue
 The queue of pending tasks.
 

Detailed Description

A file descriptor event loop.

Definition at line 80 of file fd_loop.c.

Field Documentation

◆ ntasks

size_t io_fd_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 119 of file fd_loop.c.


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