Lecture 7 - Condition Variables Flashcards
1
Q
What are condition variables?
A
synchronisation mechanism used to wait for a condition to become true without busy waiting
2
Q
What is busy waiting?
A
looping while holding lock, while could lead to deadlock.
3
Q
What statement do we use to wait for a condition to become true in C++ ? hint : opposite than c
4
Q
What does the _.notify_one() statement means?
A
When a condition has been met we notify all waiting threads, so they can continue execution.