Uses of Interface
kilim.Fiber.Worker
Packages that use Fiber.Worker
-
Uses of Fiber.Worker in kilim
Classes in kilim that implement Fiber.WorkerModifier and TypeClassDescriptionclassa minimal bridge or trampoline between woven and unwoven code backed by a Fiber giving the programmer explicit control over the event loop see Task for a more general and easier to use green thread implementation that automatically handles the event loop see Generator for more user friendly wrapper to use override execute() and call run() each time run() is called, execute runs until it yields, returns or throws an exception return value of true means either execute returned or threw an exception (accessible as ex()) with state stored in an internal Fiber field across invocations to reuse a Continuation, call reset() Continuation provides no scheduler - it is entirely the responsibility of the calling code to call run() again once the pausing condition has been satisfied typically used for state machines and Generators or to port an existing event loop to kilim this is a low level facility, see kilim.examples.Xorshift.X2 for an example of direct usestatic classclassGenerator<T>A Generator, from the caller's perspective, looks like a normal iterator that produces values.classTask<TT>A base class for tasks.static classstatic classTask.Invoke<TT>static classTask.Spawn<TT>class -
Uses of Fiber.Worker in kilim.examples
Classes in kilim.examples that implement Fiber.WorkerModifier and TypeClassDescriptionclassSet up a chain of tasks.classSpawn a task, communicate through a shared mailbox.classThis example prints the nth Fibonacci number.(package private) static classclassA simple file server over http Usage: Run java kilim.examples.HttpFileServer [base directory name] From a browser, go to "http://localhost:7262".class(package private) static classstatic classServer is a SessionTask, which means an instance of it is created by the NioSelectorScheduler on an incoming connection.(package private) class(package private) classstatic classstatic classstatic classclassstatic classclassSpawn a task, communicate through a shared mailbox.classA slight extension to SimpleTask.classCreates lots of tasks that print stuff, sleep, then wake up and print more.classstatic classstatic classclassclassstatic classstatic class -
Uses of Fiber.Worker in kilim.http
Classes in kilim.http that implement Fiber.WorkerModifier and TypeClassDescriptionclassResponsible for creating an HTTPRequest object out of raw bytes from a socket, and for sending an HTTPResponse object in its entirety.static classstatic class -
Uses of Fiber.Worker in kilim.nio
Classes in kilim.nio that implement Fiber.WorkerModifier and TypeClassDescription(package private) classclassclass