mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-07 21:43:33 +00:00
Add import sharedlist when hasThreadSupport
Without this change, a user's Nim code won't compile if they're using both threads & the mark-and-sweep GC:
lib/system/gc_ms.nim(75, 18) Error: undeclared identifier: 'SharedList'
toDispose: SharedList[pointer]
^
This small code block addition was copied from "lib/system/gc.nim" (where it appears directly after a `when defined(memProfiler)` block also).
This commit is contained in:
@@ -28,6 +28,9 @@ template mulThreshold(x): expr {.immediate.} = x * 2
|
||||
|
||||
when defined(memProfiler):
|
||||
proc nimProfile(requestedSize: int)
|
||||
|
||||
when hasThreadSupport:
|
||||
import sharedlist
|
||||
|
||||
type
|
||||
WalkOp = enum
|
||||
|
||||
Reference in New Issue
Block a user