mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-04 19:04:46 +00:00
@@ -411,7 +411,7 @@ proc registerCycle(s: Cell; desc: PNimTypeV2) =
|
||||
if roots.d == nil: init(roots)
|
||||
add(roots, s, desc)
|
||||
|
||||
if roots.len >= rootsThreshold+defaultThreshold:
|
||||
if roots.len - defaultThreshold >= rootsThreshold:
|
||||
collectCycles()
|
||||
when logOrc:
|
||||
writeCell("[added root]", s, desc)
|
||||
|
||||
9
tests/gc/tdisable_orc.nim
Normal file
9
tests/gc/tdisable_orc.nim
Normal file
@@ -0,0 +1,9 @@
|
||||
discard """
|
||||
joinable: false
|
||||
"""
|
||||
|
||||
import std/asyncdispatch
|
||||
|
||||
# bug #22256
|
||||
GC_disableMarkAndSweep()
|
||||
waitFor sleepAsync(1000)
|
||||
Reference in New Issue
Block a user