From 13d06d9a5ca83d655c8272b4baafaf4d2c941b2a Mon Sep 17 00:00:00 2001 From: James Boyden Date: Tue, 5 Apr 2016 19:45:46 +1000 Subject: [PATCH] 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). --- lib/system/gc_ms.nim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/system/gc_ms.nim b/lib/system/gc_ms.nim index c764571b1b..ec69f6e5fe 100644 --- a/lib/system/gc_ms.nim +++ b/lib/system/gc_ms.nim @@ -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