Promise control provides the ability to "complete" the controlled promise instance.
For each promise, there is a control, which is not part of promise API, it is a behind the scenes handle for code fulfilling the promise.
- Source
- Control.scala
class java.lang.Object
trait scala.Matchable
class Any
Def
Provide result
Provide result
Fulfills promise with given result
Returns false
if the result is already complete
- Source
- Control.scala
Controlled promise
Controlled promise
Returns promise attached to this control. There is one to one relation.
- Source
- Control.scala
Try provide result
Try provide result
Same as complete, but with try-catch block, which will handle any runtime exceptions and turn them into result with problem.
- Source
- Control.scala