Wrapper for EventEmitter for using coroutines.