Send
and Sync
๋ฌ์คํธ๋ ์๋ ๋๊ฐ์ง ํธ๋ ์ดํธ๋ฅผ ์ด์ฉํ์ฌ ์ค๋ ๋ ๊ฐ ๊ณต์ ์ ๊ทผ์ ๊ธ์ง๋ ๊ฒ์ ์ ์ ์์ต๋๋ค:
Send
:T
๊ฐ ์ค๋ ๋ ๊ฐ ์ด๋์ด ์์ ํ๋ค๋ฉด,T
์ ํ์ ์Send
์ ๋๋ค.Sync
:&T
๊ฐ ์ค๋ ๋ ๊ฐ ์ด๋์ด ์์ ํ๋ค๋ฉด,&T
์ ํ์ ์Sync
์ ๋๋ค.
How does Rust know to forbid shared access across thread? The answer is in two traits: