RosettaCodeData/Task/Concurrent-computing/Groovy/concurrent-computing.groovy
2023-07-01 13:44:08 -04:00

6 lines
161 B
Groovy

'Enjoy Rosetta Code'.tokenize().collect { w ->
Thread.start {
Thread.sleep(1000 * Math.random() as int)
println w
}
}.each { it.join() }