Am Mittwoch, 20. November 2013 um 00:30:54, schrieb Tommaso Cucinotta 
<tomm...@lyx.org>
> On 19/11/13 20:55, Kornel Benko wrote:
> > I know. Scott and I are testing with lockf() now.
> 
> What about boost::interprocess::file_lock ?
> 
> Note from
> 
>   
> http://www.boost.org/doc/libs/1_55_0/doc/html/boost/interprocess/file_lock.html
> 
> "A file lock can't guarantee synchronization between threads of the same
> process so just use file locks to synchronize threads from different 
> processes."

Yes, but we need synchronization between different processes.

> Not sure it fits in such case. Otherwise, I'd say the rest of 
> boost::interprocess
> might fit, e.g.: boost::interprocess::interprocess_mutex
>

I thought about something I programmed in the past.
Using semaphores on shared memory (over mmap() of file from userdir). But it 
looked like overkill.

> Note from 
> 
>   
> http://www.boost.org/doc/libs/1_55_0/doc/html/boost/interprocess/interprocess_mutex.html
> 
> "Wraps a interprocess_mutex that can be placed in shared memory and can be 
> shared between processes.
> Allows timed lock tries"

Yes, but the same reason.

At least lockf() is :POSIX, and it works.

> My2c,
> 
>       T.

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to