is there any documentation or samples on how to cr...
# coroutines
m
is there any documentation or samples on how to create my own select clauses? e.g. like I can wrap callback into suspending function I would like to wrap my callback into
SelectClause
so it can get triggered in select statement
From what I see, I have to implement
SelectClause
interface, but its members are internal
I guess I could wrap my callback into suspend function and do
async { mySuspendFunction() }.onAwait
but this seems to be pretty roundabout way of doing it
d
I think that's the way to go here.
You're waiting for an async job with select. Although, you probably shouldn't inline it.
👍 1