> Is it because of GC-safety so closure cannot capture it? Yes, variable capturing is prone to races even in languages that have a shared heap GC.
But in general, the capture in Nim captures the variable, not its value, so you
need to do something like:
for i in 0..threads.high:
closureScope:
let i = i
captureMe(i)
