arrow-fx-coroutines / arrow.fx.coroutines.stream.concurrent / Dequeue1

Dequeue1

interface ~~Dequeue1~~<A> Deprecated: Stream is deprecated in favor of Flow. Use ReceiveChannel

Provides the ability to dequeue individual elements from a Queue.

Functions

dequeue1 Dequeues one A from this queue. Completes once one is ready.abstract suspend fun dequeue1(): A
tryDequeue1 Tries to dequeue a single element. Unlike dequeue1, this method does not semantically block until a chunk is available - instead, None is returned immediately.abstract suspend fun tryDequeue1(): Option<A>

Inheritors

NoneTerminatedQueue interface ~~NoneTerminatedQueue~~<A> : Enqueue<Option<A>>, Dequeue1<Option<A>>, Dequeue<A>
Queue A queue of elements. Operations are all nonblocking in their implementations, but may be ‘semantically’ blocking. For instance, a queue may have a bound on its size, in which case enqueuing may block (be delayed asynchronously) until there is an offsetting dequeue.interface ~~Queue~~<A> : Enqueue<A>, Dequeue1<A>, Dequeue<A>

Do you like Arrow?

Arrow Org
<