I’m still new here, and still trying to understand this curio internally.
I’m seeing the traps module (https://github.com/dabeaz/curio/blob/master/curio/traps.py)…Actually, i can understand the terms of coroutine, yield, return and some asynchronous related constructs.
I see some code, for example:
@coroutine def _get_current(): ''' Get the currently executing task ''' return (yield (_trap_get_current,)
and some others code
@coroutine def _read_wait(fileobj): ''' Wait until reading can be performed. ''' yield (_trap_io, fileobj, EVENT_READ, 'READ_WAIT')
The questions is, what the technical differences and behaviour between two of coroutine construct above ? one using yield directly and using return (yield bla) construct …
Is there any significant impact ?
Thanks for attentions, maybe continued on others questions