lock
an archive of posts with this tag
-
mutex와 RAII 기반 잠금
여러 스레드가 같은 데이터를 동시에 만지면 왜 망가지는가? race condition을 막는 mutex, 예외에도 안전한 RAII 잠금(lock_guard·unique_lock), 그리고 읽기/쓰기를 구분하는 shared_mutex.
an archive of posts with this tag
여러 스레드가 같은 데이터를 동시에 만지면 왜 망가지는가? race condition을 막는 mutex, 예외에도 안전한 RAII 잠금(lock_guard·unique_lock), 그리고 읽기/쓰기를 구분하는 shared_mutex.