Boost logo

Boost :

From: Vinícius dos Santos Oliveira (vini.ipsmaker_at_[hidden])
Date: 2020-05-14 15:37:07


Em qui., 14 de mai. de 2020 às 07:42, Phil Endecott via Boost <
boost_at_[hidden]> 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/

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk