Lightweight implementation of event-driven coroutines.