4 ms·
Worth calling out that the introduction of multiple locks can lead to deadlocks etc. It would actually make for a nice library to have lock acquisition decoupl
by lumost 4y ago
Worth calling out that the introduction of multiple locks can lead to deadlocks etc.
It would actually make for a nice library to have lock acquisition decoupled from lock scope in the caller. Eg every call to lock acquire passes some identifier, and the lock implementation decides what it will do with that identifier eg global lock, scoped lock etc
- jeffbee 4y agoI find that thread safety annotations in clang help prevent deadlocks when there’s a tricky section.