Concurrent computing: Difference between revisions
m
→{{header|Sidef}}: added a random sleep, to guarantee a random order
m (→{{header|Sidef}}: added a random sleep, to guarantee a random order) |
|||
Line 1,389:
=={{header|Sidef}}==
A very basic threading support is provided by the '''Block.fork()''' method:
<lang ruby>var a = <Enjoy Rosetta Code>
{ Sys.sleep(1.rand)
say str
}.fork
}.map{|thr| thr.wait }</lang>
{{out}}
|