RosettaCodeData/Task/Concurrent-computing/Astro/concurrent-computing.astro
2017-09-25 22:28:19 +02:00

12 lines
247 B
Text

fun main():
let words = ['Enjoy', 'Rosetta', 'Code']
random.seed(time.now())
let q = Chan[Str]()
for w in words:
run (w:) ->
time.sleep(random())
q << w
for i in [:words.size]:
print q