Skip to content

Commit

Permalink
docs: add note about OS threads (#19225)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnkdev committed Aug 28, 2023
1 parent 007519e commit 9d4233d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/docs.md
Expand Up @@ -4059,6 +4059,13 @@ fn main() {
}
```

> **Note**
> Threads rely on the machine's CPU (number of cores/threads).
> Be aware that OS threads spawned with `spawn`
> have limitations in regard to concurrency,
> including resource overhead and scalability issues,
> and might affect performance in cases of high thread count.
There's also a `go` keyword. Right now `go foo()` will be automatically renamed via vfmt
to `spawn foo()`, and there will be a way to launch a coroutine with `go` (a lightweight
thread managed by the runtime).
Expand Down

0 comments on commit 9d4233d

Please sign in to comment.