2023-11-30 09:26:21 -05:00
|
|
|
---
|
|
|
|
course: Concurrency
|
|
|
|
session: Morning
|
|
|
|
---
|
2023-12-31 00:15:07 +01:00
|
|
|
|
2023-05-02 08:02:28 +02:00
|
|
|
# Welcome to Concurrency in Rust
|
2022-12-21 16:36:30 +01:00
|
|
|
|
|
|
|
Rust has full support for concurrency using OS threads with mutexes and
|
|
|
|
channels.
|
|
|
|
|
|
|
|
The Rust type system plays an important role in making many concurrency bugs
|
2022-12-30 20:53:38 -08:00
|
|
|
compile time bugs. This is often referred to as _fearless concurrency_ since you
|
2022-12-21 16:36:30 +01:00
|
|
|
can rely on the compiler to ensure correctness at runtime.
|
2024-03-06 21:11:52 +00:00
|
|
|
|
|
|
|
<details>
|
|
|
|
|
|
|
|
- Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc.
|
|
|
|
- The type system gives us safety for concurrency without any special features.
|
|
|
|
- The same tools that help with "concurrent" access in a single thread (e.g., a
|
|
|
|
called function that might mutate an argument or save references to it to read
|
|
|
|
later) save us from multi-threading issues.
|
|
|
|
|
|
|
|
</details>
|