Timeline for Why does a condition variable's wait() release the associated mutex before blocking and reacquire it before returning?
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| yesterday | history | edited | Useless | CC BY-SA 4.0 | deduplication |
| Nov 18 at 19:30 | comment | added | Useless | Where were you a year ago when I needed you, oh editor, my editor? | |
| Nov 17 at 0:54 | comment | added | Guybrush Threepwood | By the way, good work on cross-referencing so many different books | |
| Nov 8, 2024 at 10:50 | comment | added | Useless | It would be weird to say that a mutex being locked means that the data protected by the mutex is now ready to read - except by the thread which already holds the lock. A mutex being locked doesn't preclude the data being consistent, but you're sidestepping all the guarantees mutual exclusion is designed to provide if you simply assume it. | |
| Nov 7, 2024 at 17:38 | comment | added | philn | "Well, one thing it might mean is that another thread is currently changing the data protected by that mutex, right?" Sure, but it could also mean the data was written and the reader thread(s) can now read it. | |
| Nov 11, 2020 at 18:04 | history | answered | Useless | CC BY-SA 4.0 |