mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-31 02:43:41 +00:00
Mark setupForeignThreadGc and initGC as gcsafe (#5353)
This commit is contained in:
committed by
Andreas Rumpf
parent
ca39e113d5
commit
61b4bb5af5
@@ -135,7 +135,7 @@ when allowForeignThreadGc:
|
||||
var
|
||||
localGcInitialized {.rtlThreadVar.}: bool
|
||||
|
||||
proc setupForeignThreadGc*() =
|
||||
proc setupForeignThreadGc*() {.gcsafe.} =
|
||||
## Call this if you registered a callback that will be run from a thread not
|
||||
## under your control. This has a cheap thread-local guard, so the GC for
|
||||
## this thread will only be initialized once per thread, no matter how often
|
||||
|
||||
Reference in New Issue
Block a user