mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-23 15:11:40 +00:00
bugfix
This commit is contained in:
@@ -27,8 +27,9 @@ when defined(gcYrc):
|
||||
lockState {.threadvar.}: YrcLockState
|
||||
|
||||
proc acquireMutatorLock() {.compilerRtl, inl.} =
|
||||
acquireRead gYrcGlobalLock
|
||||
lockState = HasMutatorLock
|
||||
if lockState == HasNoLock:
|
||||
acquireRead gYrcGlobalLock
|
||||
lockState = HasMutatorLock
|
||||
|
||||
proc releaseMutatorLock() {.compilerRtl, inl.} =
|
||||
if lockState == HasMutatorLock:
|
||||
|
||||
@@ -435,7 +435,7 @@ when defined(nimOrcStats):
|
||||
proc GC_runOrc* =
|
||||
yrcCollectorLock:
|
||||
mergePendingRoots()
|
||||
if mayRunCycleCollect():
|
||||
if roots.len > 0 and mayRunCycleCollect():
|
||||
var j: GcEnv
|
||||
init j.traceStack
|
||||
collectCyclesBacon(j, 0)
|
||||
|
||||
Reference in New Issue
Block a user