class Broker[T] extends AnyRef
An unbuffered FIFO queue, brokered by Offer
s. Note that the queue is
ordered by successful operations, not initiations, so one
and two
may not be received in that order with this code:
val b: Broker[Int] b ! 1 b ! 2
But rather we need to explicitly sequence them:
val b: Broker[Int] for { () <- b ! 1 () <- b ! 2 } ()
BUGS: the implementation would be much simpler in the absence of cancellation.
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- Broker
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new Broker()
Value Members
- def !(msg: T): Future[Unit]
Send an item on the broker, returning a {{Future}} indicating completion.
- def !!(msg: T): Unit
Like {!}, but block until the item has been sent.
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ?: Future[T]
Retrieve an item from the broker, asynchronously.
- def ??: T
Retrieve an item from the broker, blocking.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val recv: Offer[T]
- def recvAndAwait(): T
- See also
operator
??
- def recvAndSync(): Future[T]
- See also
operator
?
- def send(msg: T): Offer[Unit]
- def sendAndAwait(message: T): Unit
- See also
operator
!!
- def sendAndSync(message: T): Future[Unit]
- See also
operator
!
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()