doc: remove the paragraph about vfmt renaming go to spawn (already finished) (#23673)

This commit is contained in:
Mike Ward 2025-02-08 09:45:55 -06:00 committed by GitHub
parent 7720b5f49a
commit 8bbaab396f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4365,8 +4365,11 @@ println(compare(1.1, 1.2)) // -1
### Spawning Concurrent Tasks ### Spawning Concurrent Tasks
V's model of concurrency is going to be very similar to Go's. V's model of concurrency is similar to Go's.
For now, `spawn foo()` runs `foo()` concurrently in a different thread:
`go foo()` runs `foo()` concurrently in a lightweight thread managed by the V runtime.
`spawn foo()` runs `foo()` concurrently in a different thread:
```v ```v
import math import math
@ -4394,10 +4397,6 @@ fn main() {
> including resource overhead and scalability issues, > including resource overhead and scalability issues,
> and might affect performance in cases of high thread count. > 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).
Sometimes it is necessary to wait until a parallel thread has finished. This can Sometimes it is necessary to wait until a parallel thread has finished. This can
be done by assigning a *handle* to the started thread and calling the `wait()` method be done by assigning a *handle* to the started thread and calling the `wait()` method
to this handle later: to this handle later: