R
- the result typepublic interface Continuation<R>
Most commonly, a continuation can be used to encode a single program control mechanism (i.e. a logical "return"). Advanced usages may also need to encode multiple control mechanisms (e.g. an exceptional execution path). For such usages, each control path could be explicitly represented as a separate Continuation, e.g.:
void doAsync(Continuation<Result> contNormal, Continuation<Exception> contExceptional);
Modifier and Type | Method and Description |
---|---|
void |
proceed(R r)
Resume the execution after the completion of an asynchronous call.
|
void proceed(R r)
r
- the result of the execution preceding this continuation