Uses of Class
com.peterphi.std.threading.SettableFuture
-
Uses of SettableFuture in com.peterphi.std.threading
Modifier and TypeClassDescriptionclass
A wrapper type which takes a Callable and turns it into a RunnableFutureModifierConstructorDescriptionSettableFuture
(ParamInvokeable<SettableFuture<T>> onSet, ParamInvokeable<SettableFuture<T>> onCancel) Create a SettableFuture which will potentially execute tasks upon set and upon cancel; the handlers will hold the exclusive lock on the monitor for the duration of their execution
The handlers, (as they are ParamInvokeables) run synchronously with the call toset
orcancel
; they run after the effects have taken place and after any interested parties waiting on the monitor have been notified