Event loop that drives a poller backend. More...
#include <loop.hpp>
Public Member Functions | |
| void | Loop () |
| Runs the main loop until Stop() is called. | |
| void | Stop () |
| Stops the loop. | |
| void | Step () |
| Runs one event-loop iteration: polls for I/O/timer events then resumes all coroutines whose events fired. | |
| TPoller & | Poller () |
| Provides access to the underlying poller instance. | |
Event loop that drives a poller backend.
Each call to Step() runs one polling round: it calls Poller_.Poll() to collect ready I/O events and timers, then Poller_.WakeupReadyHandles() to resume the waiting coroutines.
Loop() repeats Step() until Stop() is called. For manual control (e.g. driving the loop until a specific TFuture completes), use Step() directly:
For server-style programs with detached TVoidTask coroutines: