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:
James Boyden
2016-04-05 19:45:46 +10:00
parent 1446dc87c3
commit 13d06d9a5c

View File

@@ -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