diff --git a/lib/system/yrc.nim b/lib/system/yrc.nim index c7c589f681..9f82c68252 100644 --- a/lib/system/yrc.nim +++ b/lib/system/yrc.nim @@ -65,8 +65,7 @@ type var gYrcGlobalLock: Lock roots: CellSeq[Cell] # merged roots, used under global lock - toIncStripes: array[NumStripes, Stripe] - toDecStripes: array[NumStripes, Stripe] + stripes: array[NumStripes, Stripe] rootsThreshold: int = 128 defaultThreshold = when defined(nimFixedOrc): 10_000 else: 128 @@ -80,37 +79,36 @@ proc nimIncRefCyclic(p: pointer; cyclic: bool) {.compilerRtl, inl.} = let idx = getStripeIdx() while true: var overflow = false - withLock toIncStripes[idx].lock: - if toIncStripes[idx].toIncLen < QueueSize: - toIncStripes[idx].toInc[toIncStripes[idx].toIncLen] = h - toIncStripes[idx].toIncLen += 1 + withLock stripes[idx].lock: + if stripes[idx].toIncLen < QueueSize: + stripes[idx].toInc[stripes[idx].toIncLen] = h + stripes[idx].toIncLen += 1 else: overflow = true if overflow: withLock gYrcGlobalLock: for i in 0..