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

Albert

11/21/2018, 7:44 PM
Is there an easy way to get everything what is currently in a channel? For example if I do something like
channel.take(10)
and there are currently only 8 elements, I want to have those 8 elements instead of waiting until it hits 10
d

dave08

11/21/2018, 7:48 PM
Maybe
poll
while it returns
true
?
a

Albert

11/21/2018, 7:49 PM
Thats what I needed thanks @dave08
2 Views