Files
Nim/tests/threads/tthreadheapviolation1.nim
2011-07-10 15:48:13 +02:00

15 lines
241 B
Nim
Executable File

var
global: string = "test string"
t: TThread[string]
proc horrible() {.thread.} =
global = "string in thread local heap!"
var x = global
var mydata = (x, "my string too")
echo global
createThread(t, horrible)
joinThread(t)