Em qui., 14 de mai. de 2020 às 07:42, Phil Endecott via Boost < boost@lists.boost.org> escreveu:
Can we improve how interprocess mutexes and condition variables behave on process termination? [...]
After some more thought, here is another idea: PTHREAD_MUTEX_ROBUST is no longer a property of the mutex, but a property of the lock. So a normal unique_lock will map the behaviour of PTHREAD_MUTEX_STALLED (i.e. a non-robust mutex) while an unique_robust_lock will still succeed to acquire a mutex whose process died while holding a lock (and then user has to check whether acquired lock is consistent). If there are multiple locks waiting to acquire the mutex whose process crashed, only a unique_robust_lock will succeed in acquiring the mutex. -- Vinícius dos Santos Oliveira https://vinipsmaker.github.io/