From 7a18c1ef44d2b43154364b431d0d6114ea1bd32e Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Sat, 10 Dec 2022 23:23:31 +0800 Subject: [PATCH] clean up the documentation of threads (#21067) * clean up the documentation of threads * cleanup --- doc/manual.md | 13 +------------ lib/std/typedthreads.nim | 6 ------ 2 files changed, 1 insertion(+), 18 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 diff --git a/lib/std/typedthreads.nim b/lib/std/typedthreads.nim index 53b18d01e..970d381c3 100644 --- a/lib/std/typedthreads.nim +++ b/lib/std/typedthreads.nim @@ -9,12 +9,6 @@ ## Thread support for Nim. ## -## Nim's memory model for threads is quite different from other common -## programming languages (C, Pascal): Each thread has its own -## (garbage collected) heap and sharing of memory is restricted. This helps -## to prevent race conditions and improves efficiency. See `the manual for -## details of this memory model `_. -## ## Examples ## ======== ##