https://kotlinlang.org logo
#coroutines
Title
# coroutines
o

octylFractal

04/16/2019, 2:33 AM
are there plans to make
SelectClause0.registerSelectClause0
& friends non-internal API? I want to write my own low-level primitive with select clauses available, but I don't want to touch the internals
my use-case is making essentially a new
Channel
type, that essentially functions as an RPC. You can "send" an
Op<R>
instance, and then some other coroutine will "receive" it, make the call, and then "send" back the result. then the original "send" returns, and gives you R. I want the processing coroutine to be able to select among multiple RPC channels, for obvious performance reasons, but it currently looks like my best bet is to implement it on-top of the existing Channel primtives
v

Vsevolod Tolstopyatov [JB]

04/16/2019, 8:14 AM
No plans yet, we are reworking this part and don’t want to commit on this API stability
you are right, the best option is to implement your approach on top of regular channels
o

octylFractal

04/16/2019, 8:16 AM
yea, that's what I ended up doing -- made a "fake" select clause by just taking the SelectBuilder as a receiver, which adds extra logic in a channel select
4 Views