-
- All Known Subinterfaces:
Task
- All Known Implementing Classes:
AbstractTask
,AgentModel
,AgentNode
,MetaEdgeAgent
,MetaHostAgent
,MetaLaneAgent
,MetaMeshAgent
,MetaPartAgent
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface TaskFunction
Function to invoke as a sequential process on a concurrent executionStage
. UseStage.task(TaskFunction)
to bind aTaskFunction
to aStage
, and invokeTaskRef.cue()
to schedule the concurrent execution of the sequential task.Blocking
TaskFunction
implementations should not perform long running or blocking operations. If a blocking operation needs to be performed, implement aTask
that returnstrue
fromtaskWillBlock()
to avoid thread starvation of the executionStage
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
runTask()
Executes this sequential process.
-