►Full Series Playlist: [ Ссылка ]
►Find full courses on: [ Ссылка ]
►Join as Member to Support the channel: [ Ссылка ]
►Git Repo: [ Ссылка ]
►Lesson Description: In this lesson we learn about deadlock, why it happens, how to prevent it, and why we may want to use RAII based locks (i.e., lock_guard) to help prevent us forgetting to release a lock.
00:00 Being frozen in time, deadlock
0:50 Creating a deadlock intentionally
1:27 Visual of what it means to forget to unlock
2:30 Why lock and unlock is not enough
3:00 try/catch and forgetting to unlock
4:24 Introducing the lock_guard
5:06 Refactoring with lock_guard for RAII
6:33 Conclusion and notes on other locks
►YouTube Channel: [ Ссылка ]
►Please like and subscribe to help the channel!
![](https://i.ytimg.com/vi/Zp17-UDKM90/mqdefault.jpg)