|
uvco 0.1
|
#include <loop.h>

Public Member Functions | |
| Loop () | |
| Loop (const Loop &)=delete | |
| Loop (Loop &&)=delete | |
| Loop & | operator= (const Loop &)=delete |
| Loop & | operator= (Loop &&)=delete |
| ~Loop () | |
| uv_loop_t * | uvloop () const |
| Get a non-owned pointer to the loop. | |
Static Public Member Functions | |
| static void | enqueue (std::coroutine_handle<> handle) |
| static void | cancel (std::coroutine_handle<> handle) |
| static std::coroutine_handle | getNext () |
Private Member Functions | |
| void | run () |
| void | runOne () |
Static Private Member Functions | |
| static Scheduler & | currentScheduler () |
Private Attributes | |
| uv_loop_t | loop_ |
| Scheduler | scheduler_ |
| bool | stopped_ = false |
Static Private Attributes | |
| static Loop * | defaultLoop = nullptr |
Friends | |
| void | runLoop (Loop &loop) |
Not used by user code! Use runMain() for the top-level interface.
A wrapper around a libuv event loop. uvloop() returns a reference to the loop, and run() starts the event loop. enqueue() schedules a coroutine to run on the default loop at a later time, enabling any part of uvco to easily schedule work on the current loop.
Typically this is only used by uvco's internal machinery. User code will pass around a reference to the loop.
| uvco::Loop::Loop | ( | ) |
|
delete |
|
delete |
| uvco::Loop::~Loop | ( | ) |
|
static |
|
staticprivate |
|
static |
|
static |
|
private |
Run the event loop. This will serve all promises initialized before calling it.
|
private |
|
nodiscard |
Get a non-owned pointer to the loop.
|
friend |
|
staticprivate |
|
mutableprivate |
|
private |
|
private |