Welcome to Concurrency in Rust
๋ฌ์คํธ๋ ๋์์ฑ ์ง์์ด ๋ง๊ฐํฉ๋๋ค. ์ด์์ฒด์ ๋ ๋ฒจ์ ์ค๋ ๋๋ฅผ ์ฌ์ฉํ๋ฉฐ, ๋ฎคํ์ค์ ์ฑ๋๋ ์ง์ํฉ๋๋ค.
๋ฌ์คํธ์ ํ์ ์์คํ ์ ํ๋ก๊ทธ๋จ์ ๋์์ฑ ๋ฒ๊ทธ๊ฐ ์์ ๊ฒฝ์ฐ, ์ปดํ์ผ ์์ ์๋ฌ๊ฐ ๋ฐ์ํ๋๋ก ํด ์ค๋๋ค. ์ปดํ์ผ๋ฌ๋ฅผ ์ด์ฉํด์ ํ๋ก๊ทธ๋จ์ด ์ํ์์ ์ ํํ ๋์ํจ์ ๋ฏธ๋ฆฌ ๋ณด์ฅํด ์ฃผ๊ธฐ ๋๋ฌธ์, ์ฌ๋๋ค์ ์ด๋ฅผ ์ข ์ข ๊ฒ์๋ ๋์์ฑ ์ด๋ผ๊ณ ํฉ๋๋ค.
- 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.