Replies: 1 comment
-
|
volatile 키워드는 모든 스레드에서 레지스터가 아닌 메인 메모리로부터 값을 읽고 쓰도록 강제합니다. 따라서 공유되는 변수의 가시성을 보장해주게 됩니다. 하지만 멀티스레드 환경에서 원자성을 보장해주지는 않습니다. 따라서 작업 간 재정렬(reordering) 문제를 해결해주지 않기 때문에 고유락(Intrinsic Lock)을 사용해야 합니다. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
.
Beta Was this translation helpful? Give feedback.
All reactions