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

Ruckus

10/15/2018, 7:37 PM
Is there a standard way to skip a select clause for a closed channel?
onReceiveOrNull
doesn't really work if I have multiple channels and want the rest to continue if any of them close (as
select
is biased to the first).
e

elizarov

10/15/2018, 7:49 PM
Not at the moment. We are planning to add something for this in the future.
r

Ruckus

10/15/2018, 7:50 PM
Cool, thanks. I wasn't sure if I'd missed something.
e

elizarov

10/15/2018, 7:51 PM
Right now it is possible, but quite boiler-platish to track closing of multiple channels.
r

Ruckus

10/15/2018, 8:00 PM
Fair enough. It's not urgent (I was just experimenting with different ideas), so I'll just wait for the suspend for the future version.
v

Vsevolod Tolstopyatov [JB]

10/15/2018, 8:02 PM
(as
select
is biased to the first).
also, we have
selectUnbiased
r

Ruckus

10/15/2018, 8:11 PM
Is there much of an overhead for the random shuffling of the clauses? Sorry, dumb question
5 Views