Concurrent computing

A very basic threading support is provided by the Block.fork() method:

var a = <Enjoy Rosetta Code>

a.map{|str|
    {   Sys.sleep(1.rand)
        say str
    }.fork
}.map{|thr| thr.wait }

Output:

Enjoy
Code
Rosetta

Last updated