Skip to content

Commit 5a76fe4

Browse files
author
Steve Smith
committed
Remove thread-per-CPU bit as it may not be accurate.
1 parent b9e17fa commit 5a76fe4

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/doc/book/testing.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -590,11 +590,10 @@ please see the [Documentation chapter](documentation.html).
590590
# Testing and concurrency
591591

592592
One thing that is important to note when writing tests are run concurrently
593-
using threads (by default the number of threads is equal to the number of CPUs
594-
on the machine). For this reason you should take care that your tests are
595-
written in such a way as to not depend on each-other, or on any shared
596-
state. "Shared state" can also include the environment, such as the current
597-
working directory, or environment variables.
593+
using threads. For this reason you should take care that your tests are written
594+
in such a way as to not depend on each-other, or on any shared state. "Shared
595+
state" can also include the environment, such as the current working directory,
596+
or environment variables.
598597

599598
If this is an issue it is possible to control this concurrency, either by
600599
setting the environment variable `RUST_TEST_THREADS`, or by passing the argument
@@ -623,7 +622,7 @@ $ cargo test -- --nocapture # Same as above
623622

624623
However a better method avoiding capture is to use logging rather than raw
625624
output. Rust has a [standard logging API][log], which provides a frontend to
626-
multiple loggin implementations. This can be used in conjunction with the
625+
multiple logging implementations. This can be used in conjunction with the
627626
default [env_logger] to output any debugging information in a manner that can be
628627
controlled at runtime.
629628

0 commit comments

Comments
 (0)