Package kilim.examples
Class SimpleTask
java.lang.Object
kilim.Task
kilim.examples.SimpleTask
- All Implemented Interfaces:
Runnable,EventSubscriber,Fiber.Worker
Spawn a task, communicate through a shared mailbox. The task's
termination is known through another mailbox.
The structure of this class is not much different from a Thread
version that uses PipedInput/OutputStreams (Task instead of Thread,
execute() instead of run(), and typed, buffered mailboxes instead
of pipes).
[compile] javac -d ./classes SimpleTask.java
[weave] java kilim.tools.Weave -d ./classes kilim.examples.SimpleTask
[run] java -cp ./classes:./classes:$CLASSPATH kilim.examples.SimpleTask
-
Nested Class Summary
Nested classes/interfaces inherited from class kilim.Task
Task.Fork, Task.Invoke<TT>, Task.Spawn<TT> -
Field Summary
FieldsFields inherited from class kilim.Task
done, exitResult, fiber, id, pauseReason, running, scheduler, timer -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class kilim.Task
checkKill, dump, equals, errNotWoven, errNotWoven, errorExit, errorExit, execute, exit, exit, fork, getCurrentTask, getExecutionThread, getPauseReason, getScheduler, getStackDepth, getState, getTid, hashCode, id, idledown, informOnExit, invoke, isDone, join, joinb, onEvent, pause, pause, pinToThread, prePin, resume, resumeOnScheduler, run, setPauseReason, setScheduler, setTid, shutdown, sleep, spawn, spawn, start, toString, unpinFromThread, yield, yield