#include <coroutines.h>
Public Member Functions | |
CoroContextHolder (CoroContext &ctx) | |
Wrapper class which holds a pointer to a pointer to a CoroBaseContext. Note that the destructor kills the context being held, but ONLY if the _sleep val of that context is zero. This way, a coroutine can just 'return' without freeing the allocated context (in Simon Tatham's original code, one had to use a special macro to return from a coroutine).