A Delay is the default of a deferred operation
A building block for writing your own odelay.Timer.
A building block for writing your own odelay.Timer. Call completePromise(_)
with the value of the result of
the operation. Call cancelPromise()
to cancel it. To query the current state of the promise, use
promiseIncomplete
If calling cancel on a Delay's implemention has no other effect than cancelling the underlying promise.
If calling cancel on a Delay's implemention has no other effect than cancelling the underlying promise. Use this as a mix in.
val timer = new Timer { def apply(delay: FiniteDuration, op: => T) = new PromisingDelay[T] with SelfCancelation[T] { schedule(delay, completePromise(op)) } ... }
The deferrer of some arbitrary operation
The deferrer of some arbitrary operation
Provides an interface for producing Delays.
Provides an interface for producing Delays. Use requires an implicit odelay.Timer to be in implicit scope.
val delay = odelay.Delay(2.seconds) { todo }
Defines default configurations for timers
Odelay defines a set of primitives for delaying the execution of operations.
This is differs from scala.concurrent.Futures in that the execution of an operation will not occur until a provided delay, specified as a scala.concurrent.duration.Duration. The delay of a task may also may be canceled. Operations may also be executed after a series of delays, also represented by scala.concurrent.duration.Durations.
These primitives can be used to complement the usage of scala.concurrent.Futures by defining a deterministic delay for the future operation as well as a way to cancel the future operation.
An odelay.Delay represents a delayed operation and defines a future method which may be used to trigger dependent actions and delay cancellations.