Package kilim.examples
Class SimpleTask
- java.lang.Object
-
- kilim.Task
-
- kilim.examples.SimpleTask
-
- All Implemented Interfaces:
java.lang.Runnable,EventSubscriber,Fiber.Worker
public class SimpleTask extends Task
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>
-
-
Constructor Summary
Constructors Constructor Description SimpleTask()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()The entry point.static voidmain(java.lang.String[] args)-
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
-
-
-
-
Field Detail
-
mb
static Mailbox<java.lang.String> mb
-
-