Skip to content

Commit e8add17

Browse files
committed
docs: GOMAXPROCS wording, -parallel default, assert ellipsis
1 parent e4c2f7f commit e8add17

4 files changed

Lines changed: 12 additions & 10 deletions

File tree

‎docs/lib/Os/cpus.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ func Os.cpus(): int
88
```
99

1010
Os.cpus returns the number of CPUs the program may use at once: the host's logical CPUs, or fewer
11-
under a container's CPU limit, and at least 1. $GOMAXPROCS, when set, is the count instead. It can
12-
change while the program runs, as a container's limit can. It is the limit to give
11+
under a container's CPU limit, and at least 1. $GOMAXPROCS, set to a positive number, is the count
12+
instead. It can change while the program runs, as a container's limit can. It is the limit to give
1313
[`Parallel.map`](../Parallel/map.md) for CPU-bound work.
1414

1515
<!-- end generated -->

‎docs/lib/Test/parallel.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
func Test.parallel(): void
88
```
99

10-
Test.parallel runs the current test alongside the other parallel tests of its parent, once the tests of that parent that did not call it have ended, and after the parent's body and deferred blocks. It is called once, from the test's body, and panics from a deferred block.
10+
Test.parallel runs the current test alongside the other parallel tests of its parent, once the tests
11+
of that parent that did not call it have ended, and after the parent's body and deferred blocks. It
12+
is called once, from the test's body, and panics from a deferred block.
1113

1214
<!-- end generated -->
1315

@@ -19,8 +21,8 @@ Test.parallel runs the current test alongside the other parallel tests of its pa
1921
- A subtest that calls `Test.parallel` returns control to its parent at the call, so the parent's
2022
body goes on. The parent ends only after its parallel subtests end, and its deferred blocks run
2123
before they end.
22-
- At most `-parallel n` tests run at once after the call; the default is the number of CPUs. Tests
23-
in different files never run at once.
24+
- At most `-parallel n` tests run at once after the call; the default is what
25+
[Os.cpus](../Os/cpus.md) returns. Tests in different files never run at once.
2426
- Parallel tests share module variables and the variables of their parent. Guard what they change
2527
with a [Mutex](../Mutex/index.md).
2628
- A parallel subtest resumes only after its parent's body and deferred blocks have finished.

‎docs/lib/prelude/assert.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ not a value: it can only be called by name.
2020
line. When the condition is a comparison or an `is` test, the two values follow in parentheses.
2121
The names, field accesses, indexes, and calls inside the condition that ran follow, one per line,
2222
with their values; the two compared values are not repeated there. A value on those lines longer
23-
than 200 characters shows its first and last 100 around `…`; the compared values are always shown
24-
in full.
23+
than 200 characters shows its first and last 100 joined by an ellipsis with a space on each side;
24+
the compared values are always shown in full.
2525
- `assert` is always on: no flag or build mode turns it off.
2626
- After `assert(cond)`, the rest of the block is narrowed as after `if !cond { panic(...) }`.
2727

‎internal/prelude/prelude.d.ant‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2738,9 +2738,9 @@ func Os.platform(): string
27382738
func Os.arch(): string
27392739

27402740
// Os.cpus returns the number of CPUs the program may use at once: the host's logical CPUs, or fewer
2741-
// under a container's CPU limit, and at least 1. $GOMAXPROCS, when set, is the count instead. It can change while the
2742-
// program runs, as a container's limit can. It is the limit to give [Parallel.map] for CPU-bound
2743-
// work.
2741+
// under a container's CPU limit, and at least 1. $GOMAXPROCS, set to a positive number, is the
2742+
// count instead. It can change while the program runs, as a container's limit can. It is the limit
2743+
// to give [Parallel.map] for CPU-bound work.
27442744
func Os.cpus(): int
27452745

27462746
// Os.env returns the value of the environment variable name, or null when it is not set; a

0 commit comments

Comments
 (0)