object PromiseRef
- Source
- PromiseRef.scala
- Alphabetic
- By Inheritance
- PromiseRef
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- def apply(timeout: Timeout)(implicit system: ActorSystem): PromiseRef[Any]
Constructs a new PromiseRef which will be completed with the first message sent to it.
Constructs a new PromiseRef which will be completed with the first message sent to it.
// enables transparent use of PromiseRef as ActorRef and Promise import PromiseRef.Implicits._ // requires an implicit ActorSystem in scope val promiseRef = PromiseRef(5.seconds) promiseRef ! "message" promiseRef.future.onComplete(println) // prints "message"
- def apply(system: ActorSystem, timeout: Timeout): PromiseRef[Any]
Constructs a new PromiseRef which will be completed with the first message sent to it.
Constructs a new PromiseRef which will be completed with the first message sent to it.
// enables transparent use of PromiseRef as ActorRef and Promise import PromiseRef.Implicits._ val promiseRef = PromiseRef(system, 5.seconds) promiseRef ! "message" promiseRef.onComplete(println) // prints "message"