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?
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?