File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -5174,12 +5174,12 @@ processor. Rust's semantics lend themselves very nicely to solving a number of
51745174issues that programmers have with concurrency. Many concurrency errors that are
51755175runtime errors in other languages are compile-time errors in Rust.
51765176
5177- Rust's concurrency primitive is called a ** task** . Tasks are lightweight, and
5178- do not share memory in an unsafe manner, preferring message passing to
5179- communicate. It's worth noting that tasks are implemented as a library, and
5180- not part of the language. This means that in the future, other concurrency
5181- libraries can be written for Rust to help in specific scenarios. Here's an
5182- example of creating a task:
5177+ Rust's concurrency primitive is called a ** task** . Tasks are similar to
5178+ threads, and do not share memory in an unsafe manner, preferring message
5179+ passing to communicate. It's worth noting that tasks are implemented as a
5180+ library, and not part of the language. This means that in the future, other
5181+ concurrency libraries can be written for Rust to help in specific scenarios.
5182+ Here's an example of creating a task:
51835183
51845184``` {rust}
51855185spawn(proc() {
You can’t perform that action at this time.
0 commit comments