- java.lang.Object
-
- swim.concurrent.Conts
-
-
Method Summary
Modifier and Type Method Description static <T> Runnableasync(Cont<T> cont, T value)Returns aRunnablethat, when executed, invokes the givencontinuation with the provided constantvalue.static <X,T>
Cont<X>constant(Cont<T> cont, T value)Returns aContinuation that, when completed successfully, completes the givencontinuation with the provided constantvalue; and when failed with an error, fails the givencontinuation with the error.static <T> Cont<T>ignore()Returns aContcontinuation that, when completed successfully, does nothing; and when failed with an exception, throws the exception.static booleanisNonFatal(Throwable throwable)Returnstrueifthrowableis a recoverable exception; returnsfalseifthrowablecannot be recovered from.
-
-
-
Method Detail
-
async
public static <T> Runnable async(Cont<T> cont, T value)
Returns aRunnablethat, when executed, invokes the givencontinuation with the provided constantvalue.
-
constant
public static <X,T> Cont<X> constant(Cont<T> cont, T value)
Returns aContinuation that, when completed successfully, completes the givencontinuation with the provided constantvalue; and when failed with an error, fails the givencontinuation with the error.
-
ignore
public static <T> Cont<T> ignore()
Returns aContcontinuation that, when completed successfully, does nothing; and when failed with an exception, throws the exception.
-
isNonFatal
public static boolean isNonFatal(Throwable throwable)
Returnstrueifthrowableis a recoverable exception; returnsfalseifthrowablecannot be recovered from.
-
-