public abstract class Continuation extends java.lang.Object implements Fiber.Worker
| Modifier and Type | Class and Description |
|---|---|
static class |
Continuation.FakeTask |
| Constructor and Description |
|---|
Continuation() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Exception |
ex()
get the stored exception
|
void |
execute()
the top level entrypoint for the continuation
override this method
cannot be called directly - use run() instead
use Fiber.yield() to yield control cooperatively and return execution to the caller of run()
|
void |
execute(Fiber fiber)
the woven variant of execute() generated by the weaver
overriding this method will cause the weaver to leave it unchanged
this is a low level facility (override execute() instead)
|
void |
reset()
reset the Continuation and corresponding Fiber
cannot be called inside execute()
subsequent invocations of run() will enter execute() as a normal method, ie at the beginning
|
boolean |
run()
perform one iteration of execute()
the first invocation begins as a normal method
subsequent invocations continue from the most recent yield
|
public java.lang.Exception ex()
public boolean run()
throws NotPausable
NotPausablepublic void execute()
throws Pausable,
java.lang.Exception
execute in interface Fiber.WorkerPausablejava.lang.Exceptionpublic void execute(Fiber fiber)
execute in interface Fiber.Workerfiber - the stack information automatically provided by run()public void reset()