Coroutine-based execution machinery for ES6