* fixes #13881
* documented changed requirements for system.onThreadDestruction
* destructors.rst: update the documentation
This commit is contained in:
Andreas Rumpf 2020-05-12 15:46:24 +02:00 • committed by GitHub
commit 06dfd31612
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 84 additions and 23 deletions

View file

@ -495,9 +495,10 @@ when not defined(useNimRtl):
proc GC_disable() =
inc(gch.recGcLock)
proc GC_enable() =
if gch.recGcLock <= 0:
raise newException(AssertionDefect,
"API usage error: GC_enable called but GC is already enabled")
when defined(nimDoesntTrackDefects):
if gch.recGcLock <= 0:
raise newException(AssertionDefect,
"API usage error: GC_enable called but GC is already enabled")
dec(gch.recGcLock)
proc GC_setStrategy(strategy: GC_Strategy) = discard