mirror of https://github.com/rust-lang/nomicon
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
818 B
14 lines
818 B
8 years ago
|
# Concurrency and Parallelism
|
||
10 years ago
|
|
||
|
Rust as a language doesn't *really* have an opinion on how to do concurrency or
|
||
|
parallelism. The standard library exposes OS threads and blocking sys-calls
|
||
10 years ago
|
because everyone has those, and they're uniform enough that you can provide
|
||
10 years ago
|
an abstraction over them in a relatively uncontroversial way. Message passing,
|
||
|
green threads, and async APIs are all diverse enough that any abstraction over
|
||
|
them tends to involve trade-offs that we weren't willing to commit to for 1.0.
|
||
|
|
||
10 years ago
|
However the way Rust models concurrency makes it relatively easy to design your own
|
||
10 years ago
|
concurrency paradigm as a library and have everyone else's code Just Work
|
||
10 years ago
|
with yours. Just require the right lifetimes and Send and Sync where appropriate
|
||
10 years ago
|
and you're off to the races. Or rather, off to the... not... having... races.
|