Boost logo

Boost :

Subject: Re: [boost] Portable robust mutex an another try...
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2014-07-16 20:00:47

On 15 Jul 2014 at 17:42, Ladislav Sopko wrote:

> I did try to continue with */Ion Gaztanaga's /*idea of portable robust
> mutex.
> I post my code and considerations in codereview.

I've implemented this a few times, and I always did it by having the
locker write the current time and the pid at the point of lock. If
too much time elapses and it doesn't unlock, you can check the pid or
simply force an unlock.

It's certainly much lighter weight than use file locks. Those are
slow and not portable.


ned Productions Limited Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at