arrow-fx-coroutines / arrow.fx.coroutines.stream.concurrent / Queue / synchronous

synchronous

suspend fun <A> synchronous(): Queue<A>

Creates a Queue in which each enqueue operation must wait for a corresponding dequeue operation, and vice versa. In other words, dequeue and enqueue need to shake hands, or meet, before the value is successfully passed along. Works like functional suspending version java.util.concurrent.SynchronousQueue.

Do you like Arrow?

Arrow Org
<