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

bogdoll

03/03/2019, 6:27 PM
How would a SuspendingQueue analog to a BlockingQueue look like? Are there some example sources for that available?
d

Dico

03/03/2019, 6:32 PM
Take a look at
Channel
in
kotlinx.coroutines
.
Copy code
/**
 * Channel is a non-blocking primitive for communication between sender using [SendChannel] and receiver using [ReceiveChannel].
 * Conceptually, a channel is similar to [BlockingQueue][java.util.concurrent.BlockingQueue],
 * but it has suspending operations instead of blocking ones and it can be closed.
7 Views