frysk.proc
Interface TaskObserver.Instruction
- All Superinterfaces:
- Observer, TaskObserver
- All Known Implementing Classes:
- fstep
- Enclosing interface:
- TaskObserver
public static interface TaskObserver.Instruction
- extends TaskObserver
Interface used to notify that a Task has executed a single
instruction. updateExecuted
is called as soon as
the Instruction observer is added to the Task. And whenever the
Task starts running again (isn't blocked or suspended) it will
be called on each instruction being executed.
This TaskObserver can also be used for executing code that
needs the Task to be (temporarily) blocked or suspended as soon
as possible. updateExecuted()
will be called as
soon as this observer has been properly added, and at that time
the Task is suspended to make it possible to inspect the Task
state. If no other action is request, the method can then just
delete the observer from the Task again.
updateExecuted
Action updateExecuted(Task task)
- The task has started executing or has executed another
instruction. Return Action.BLOCK to block the task's
further execution. When Action.CONTINUE is returned
this method will be called as soon as one instruction
has been executed.