Add `tearDownForeignThreadGc` function (#5369)

This commit is contained in:
Anatoly Galiulin
2017-02-13 19:37:20 +07:00
committed by Andreas Rumpf
parent 279e4b0451
commit 6fa1dba515
5 changed files with 132 additions and 10 deletions

View File

@@ -461,3 +461,11 @@ can then attach a GC to this thread via
It is **not** safe to disable the garbage collector and enable it after the
call from your background thread even if the code you are calling is short
lived.
Before the thread exits, you should tear down the thread's GC to prevent memory
leaks by calling
.. code-block:: nim
system.tearDownForeignThreadGc()