- java.lang.Object
-
- swim.concurrent.Conts
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Runnable
async(Cont<T> cont, T value)
Returns aRunnable
that, when executed, invokes the givencont
inuation with the provided constantvalue
.static <X,T>
Cont<X>constant(Cont<T> cont, T value)
Returns aCont
inuation that, when completed successfully, completes the givencont
inuation with the provided constantvalue
; and when failed with an error, fails the givencont
inuation with the error.static <T> Cont<T>
ignore()
Returns aCont
continuation that, when completed successfully, does nothing; and when failed with an exception, throws the exception.static boolean
isNonFatal(Throwable throwable)
Returnstrue
ifthrowable
is a recoverable exception; returnsfalse
ifthrowable
cannot be recovered from.
-
-
-
Method Detail
-
async
public static <T> Runnable async(Cont<T> cont, T value)
Returns aRunnable
that, when executed, invokes the givencont
inuation with the provided constantvalue
.
-
constant
public static <X,T> Cont<X> constant(Cont<T> cont, T value)
Returns aCont
inuation that, when completed successfully, completes the givencont
inuation with the provided constantvalue
; and when failed with an error, fails the givencont
inuation with the error.
-
ignore
public static <T> Cont<T> ignore()
Returns aCont
continuation that, when completed successfully, does nothing; and when failed with an exception, throws the exception.
-
isNonFatal
public static boolean isNonFatal(Throwable throwable)
Returnstrue
ifthrowable
is a recoverable exception; returnsfalse
ifthrowable
cannot be recovered from.
-
-