When a promise is yielded, execution of the generator is interrupted until the promise is resolved. A success
value is sent into the generator, while a failure reason is thrown into the generator. Using a coroutine,
asynchronous code can be written without callbacks and be structured like synchronous code.