import taskpools
var my {.threadvar.} : int
proc count(i:int) =
my.inc
var tp = Taskpool.new()
for i in 0..100:
tp.spawn count(i)
tp.syncAll()
--define:release
--hints:off
--warnings:off
--threads:on
--gc:orc
Nim Compiler Version 1.7.1 [Windows: amd64]
Compiled at 2022-09-15
Copyright (c) 2006-2022 by Andreas Rumpf
git hash: 79afee868d784eb90972deb3ea89c96702585968
active boot switches: -d:release