dabeaz / curio

Good Curio!
Other
4.01k stars 240 forks source link

Are coroutine callbacks evil? #290

Closed kdart closed 5 years ago

kdart commented 5 years ago

I was recently writing a coroutine where I wanted an inversion of control in it. So I wrote it taking a coroutine as a parameter that is then awaited. This is basically the pattern of a callback function, except being a coroutine. I'm wondering, though, is that a code smell in async code? Is there a better way?

kdart commented 5 years ago

Was just a question. :-)