summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorDankr4d <dude569@freenet.de>2019-06-03 17:13:22 +0200
committerMiran <narimiran@disroot.org>2019-06-03 17:13:21 +0200
commit9d536b90c1e7c5c223a1e43c17faab578e93caa3 (patch)
tree125e6cc4f266022c5abe9d296246b686c51ade02 /lib/system
parent7072eaad73d3d5bc1c1c884df111b18b5d8e6e1c (diff)
downloadNim-9d536b90c1e7c5c223a1e43c17faab578e93caa3.tar.gz
Fixed "is not GC-safe as it calls 'createThread'" when creating a thread in a thread. (#11390)
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/threads.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system/threads.nim b/lib/system/threads.nim
index 2c2fd4325..050950121 100644
--- a/lib/system/threads.nim
+++ b/lib/system/threads.nim
@@ -146,7 +146,7 @@ proc threadProcWrapStackFrame[TArg](thrd: ptr Thread[TArg]) =
   when defined(boehmgc):
     boehmGC_call_with_stack_base(threadProcWrapDispatch[TArg], thrd)
   elif not defined(nogc) and not defined(gogc) and not defined(gcRegions) and not defined(gcDestructors):
-    var p {.volatile.}: proc(a: ptr Thread[TArg]) {.nimcall.} =
+    var p {.volatile.}: proc(a: ptr Thread[TArg]) {.nimcall, gcsafe.} =
       threadProcWrapDispatch[TArg]
     # init the GC for refc/markandsweep
     nimGC_setStackBottom(addr(p))