How would a SuspendingQueue analog to a BlockingQu...
# coroutines
b
How would a SuspendingQueue analog to a BlockingQueue look like? Are there some example sources for that available?
d
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.