-
Hi! In attempts to find robust mutex implementation for MacOS, I found this article, and this repo. Just some notes on your RobustLock implementation.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@vlad-nn You've raised great points, let me respond to them all:
|
Beta Was this translation helpful? Give feedback.
@vlad-nn You've raised great points, let me respond to them all:
shm::memory::Memory
. It uses POSIXshm_open
'sEEXIST
error code to ensure that the shared memory is initialized only once. There's another mechanism here to protect against dead processes too (PIDSet
). The initialization is slow, but happens only once across all the processes communicating.3.
, theRobustMutex
will be initialized only once, which is when it is set to0
, and unlocked.