AsyncQueue

dev.tauri.choam.async.AsyncQueue
See theAsyncQueue companion trait
object AsyncQueue

Various asynchronous queues

Adds asynchronous variants to the methods of Queue (see the last column of the table below). These operations have a result type in an asynchronous F, and may be fiber-blocking. For example, asynchronously removing an element from an empty queue fiber-blocks until the queue is non-empty (or until the fiber is cancelled).

Method summary of the various operations:

Rxn (may fail)

Rxn (succeeds)

F (may block)

insert

Queue.Offer#offer

Queue.Add#add

AsyncQueue.Put#put

remove

Queue.Poll#poll

-

AsyncQueue.Take#take

examine

peek

-

-

TODO: implement peek

Attributes

See also

Queue for the synchronous methods (all except the last column of this table)

Companion
trait
Source
AsyncQueue.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
AsyncQueue.type

Members list

Type members

Classlikes

sealed trait Put[-A]

Attributes

Source
AsyncQueue.scala
Supertypes
trait Offer[A]
class Object
trait Matchable
class Any
Known subtypes
trait SourceSink[A]
trait AsyncQueue[A]
trait WithSize[A]
sealed trait SourceSink[A] extends Take[A], Put[A]

Attributes

Source
AsyncQueue.scala
Supertypes
trait Put[A]
trait Take[A]
trait SourceSink[A]
trait Offer[A]
trait Poll[A]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait AsyncQueue[A]
trait WithSize[A]
sealed trait Take[+A]

Attributes

Source
AsyncQueue.scala
Supertypes
trait Poll[A]
class Object
trait Matchable
class Any
Known subtypes
trait SourceSink[A]
trait AsyncQueue[A]
trait WithSize[A]
sealed trait WithSize[A] extends AsyncQueue[A]

Attributes

Source
AsyncQueue.scala
Supertypes
trait AsyncQueue[A]
trait SourceSink[A]
trait Put[A]
trait Take[A]
trait Queue[A]
trait Add[A]
trait SourceSink[A]
trait Offer[A]
trait Poll[A]
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

final def bounded[A](bound: Int): Rxn[SourceSink[A]]

Attributes

Source
AsyncQueue.scala
final def dropping[A](capacity: Int): Rxn[WithSize[A]]

Attributes

Source
AsyncQueue.scala
final def ringBuffer[A](capacity: Int): Rxn[WithSize[A]]

Attributes

Source
AsyncQueue.scala
final def unbounded[A]: Rxn[AsyncQueue[A]]

Attributes

Source
AsyncQueue.scala
final def unboundedWithSize[A]: Rxn[WithSize[A]]

Attributes

Source
AsyncQueue.scala