mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-09 06:23:25 +00:00
15 lines
241 B
Nim
Executable File
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)
|
|
|
|
|