final class AsyncQueue[A] extends Serializable
And asynchronous queue implementation.
On poll
, if there are queued elements, it returns oe
immediately, otherwise it returns a Future
- Source
- AsyncQueue.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- AsyncQueue
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Value Members
-
def
clear(): Unit
Clears the queue of all offered items or promises.
-
def
clearAndOffer(elem: A): Unit
Clears the whole queue, then offers one item.
-
def
offer(elem: A): Unit
Enqueues an item in the queue, or feeds it to a waiting consumer if there are such waiting consumers.
Enqueues an item in the queue, or feeds it to a waiting consumer if there are such waiting consumers.
- Annotations
- @tailrec()
-
def
poll(): Future[A]
If there are elements in the queue, returns one, otherwise returns a
Future
that waits (asynchronously) until items are offered.If there are elements in the queue, returns one, otherwise returns a
Future
that waits (asynchronously) until items are offered.- Annotations
- @tailrec()
This is the API documentation for the Monix library.
Package Overview
monix.execution exposes lower level primitives for dealing with asynchronous execution:
Atomic
types, as alternative tojava.util.concurrent.atomic
monix.eval is for dealing with evaluation of results, thus exposing Task and Coeval.
monix.reactive exposes the
Observable
pattern:Observable
implementationsmonix.types implements type-class shims, to be translated to type-classes provided by libraries such as Cats or Scalaz.
monix.cats is the optional integration with the Cats library, providing translations for the types described in
monix.types
.monix.scalaz is the optional integration with the Scalaz library, providing translations for the types described in
monix.types
.