The I/O reactor is based on functions such as `poll()`, `epoll()`, `select()` and others (`kqueue()`), which allow grouping I/O handlers (sockets, file descriptors, named pipes, etc.) together, allowing guaranteed sequential processing of I/O.
The reactor consists of [[dap_worker|worker threads]], each of which is bound to its own processor in the system - [[dap_context|context]] switching without changing the processor is much faster than with it.
Inside the [[dap_worker|worker threads]], [[dap_events|events]] on the [[dap_events_socket#Descriptors|descriptor]] are processed in a conditionally infinite loop. An [[dap_events_socket#Events socket|event socket]] is bound to each [[dap_events_socket#Descriptors|descriptor]].
# Chapters
- [[dap_events]] - events that begin and end the main processing loop
- [[dap_worker]] - a worker that processes requests with events sockets
- [[dap_context]] - a context of processing
- [[dap_events_socket]] - events sockets which are tied to the worker