Packages

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
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AsyncQueue
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def clear(): Unit

    Clears the queue of all offered items or promises.

  2. def clearAndOffer(elem: A): Unit

    Clears the whole queue, then offers one item.

  3. 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()
  4. 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()