Re: [Boost-users] Boost interprocess named mutexes
Ion Gaztanaga wrote:
Mike Spertus escribió:
I am seeing the following problems with Boost interprocess named mutexes on Windows.
3. Although the documentation says that mutexes have process persistence, they appear to have filesystem persistence. This means that is a process or system crashes while the mutex is held, the mutex is permanently unavailable (without deleting it).
The documentation says kernel or filesystem persistence for "named mutex": http://www.boost.org/doc/libs/1_39_0/doc/html/interprocess/some_basic_explan...
Hi Ion, Sorry, I misread that doc page. You are of course correct. What do you think of my suggestion to use a Windows mutex to back a boost interprocess named mutex? Since "abandoned Windows mutexes" are automatically released by Windows, we see substantially fewer hangs when we use Windows mutexes. Thanks, Mike
Best,
Ion
Mike Spertus escribió:
Sorry, I misread that doc page. You are of course correct. What do you think of my suggestion to use a Windows mutex to back a boost interprocess named mutex? Since "abandoned Windows mutexes" are automatically released by Windows, we see substantially fewer hangs when we use Windows mutexes.
Windows named mutexes have reference-counted semantics, so they disappear when the last attached process dies, so they are not ompatible with POSIX lifetime semantics. Best, Ion
participants (2)
-
Ion Gaztañaga
-
Mike Spertus