mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
20 lines
263 B
Nim
20 lines
263 B
Nim
discard """
|
|
outputsub: "0"
|
|
"""
|
|
|
|
import actors
|
|
|
|
var
|
|
a: TActorPool[int, void]
|
|
createActorPool(a)
|
|
|
|
proc task(i: int) {.thread.} =
|
|
echo i
|
|
if i != 0: a.spawn (i-1, task)
|
|
|
|
# count from 9 till 0 and check 0 is somewhere in the output
|
|
a.spawn(9, task)
|
|
a.join()
|
|
|
|
|