Markdown code blocks part 5 (#20236)

No logic was added, just a few more `*.md` files have been migrated.
This commit is contained in:
Andrey Makarov 2022-08-17 22:20:22 +03:00 • committed by GitHub
commit 1c31de361d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 486 additions and 413 deletions

View file

@ -16,9 +16,10 @@ defined via `--define:useRealtimeGC`:option: (you can put this into your config
file as well).
With this switch the garbage collector supports the following operations:
.. code-block:: nim
```nim
proc GC_setMaxPause*(maxPauseInUs: int)
proc GC_step*(us: int, strongAdvice = false, stackSize = -1)
```
The unit of the parameters `maxPauseInUs` and `us` is microseconds.
@ -98,9 +99,9 @@ As long as you don't use the threadvar emulation Nim uses native thread
variables, of which you get a fresh version whenever you create a thread. You
can then attach a GC to this thread via
.. code-block:: nim
```nim
system.setupForeignThreadGc()
```
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
@ -109,10 +110,9 @@ lived.
Before the thread exits, you should tear down the thread's GC to prevent memory
leaks by calling
.. code-block:: nim
```nim
system.tearDownForeignThreadGc()
```
Keeping track of memory