Package kilim.examples
package kilim.examples
-
ClassDescriptionSet up a chain of tasks.Spawn a task, communicate through a shared mailbox.This example prints the nth Fibonacci number.A simple file server over http Usage: Run java kilim.examples.HttpFileServer [base directory name] From a browser, go to "http://localhost:7262".Example showing kilim's support for NIO.The Client is a conventional Java socket application.Server is a SessionTask, which means an instance of it is created by the NioSelectorScheduler on an incoming connection.A basic HTTP server that merely echoes the path and the query string supplied to it in a GET request Usage: Run java kilim.examples.HttpFileServer [base directory name] From a browser, try "http://localhost:7262/hello", "http://localhost:7262/buy?code=200invalid input: '&desc'=Rolls%20Royce">" SimpleHttpSession is an HTTPSession task, itself a thin wrapper over the socket connection.Spawn a task, communicate through a shared mailbox.A slight extension to SimpleTask.Spawn example with one consumer, ten producersCreates lots of tasks that print stuff, sleep, then wake up and print more.This example illustrates two 'generators' that walk a tree, one in pre-order and another in post-order.a demo and benchmark of kilim generators used to implement the xorshift PRNG runs xorshift a number of cycles, printing the nanos per cycle and the xor of the result the value is printed just to ensure that the JIT actually runs all the code https://en.wikipedia.org/wiki/Xorshift#xorshift.2B with modes to run the same algorithm as a Generator and as a raw Continuation (the default)