var i = 0
proc p1() =
i += 1
proc p2() =
i += 2
Would this allow me to access the global variable from within a proc spawned by a thread?
import threadpool
var test = "hi"
proc p1(variable) =
test = "bye"
var variable = "test"
spawn(p1(variable))
Ends up with:
t.nim(7, 8) Error: 'spawn' takes a GC safe call expression