diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-12-10 23:23:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-10 23:23:31 +0800 |
commit | 7a18c1ef44d2b43154364b431d0d6114ea1bd32e (patch) | |
tree | 7ef36bf66cd4ba749298b7d85b80a5e366247b6c /doc | |
parent | b59c657be3e9049f936c0c6cc6083a41a343737a (diff) | |
download | Nim-7a18c1ef44d2b43154364b431d0d6114ea1bd32e.tar.gz |
clean up the documentation of threads (#21067)
* clean up the documentation of threads * cleanup
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manual.md | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/doc/manual.md b/doc/manual.md index 378aaed90..bd2cf8568 100644 --- a/doc/manual.md +++ b/doc/manual.md @@ -8424,23 +8424,12 @@ This is only useful if the program is compiled as a dynamic library via the `--app:lib`:option: command-line option. - Threads ======= -To enable thread support the `--threads:on`:option: command-line switch needs to -be used. The [system module](system.html) module then contains several threading primitives. -See the [channels](channels_builtin.html) modules -for the low-level thread API. There are also high-level parallelism constructs -available. See [spawn](manual_experimental.html#parallel-amp-spawn) for +The `--threads:on`:option: command-line switch is enabled by default. The [typedthreads module](typedthreads.html) module then contains several threading primitives. See [spawn](manual_experimental.html#parallel-amp-spawn) for further details. -Nim's memory model for threads is quite different than that of other common -programming languages (C, Pascal, Java): Each thread has its own (garbage -collected) heap, and sharing of memory is restricted to global variables. This -helps to prevent race conditions. GC efficiency is improved quite a lot, -because the GC never has to stop other threads and see what they reference. - The only way to create a thread is via `spawn` or `createThread`. The invoked proc must not use `var` parameters nor must any of its parameters contain a `ref` or `closure` type. This enforces |