Interprocess condition and process crashes

I'm using Boost 1.39 on WindowsXP and I noticed that if a process crashes while waiting on an interprocess condition variable, the signaling process blocks forever in subsequent calls to notify_all(). It looks to me like boost is not using the native facilities, but some emulation, so is this scenario not supported by the emulation? The code is very simple: Process A: while (1) { { scoped_lock<named_mutex> lock(mut); cond.wait(lock); // Process A might be killed or die while in this call // do some work } } Process B: void notifyOthers() { scoped_lock<named_mutex> lock(mut); cond.notify_all(); } I've actually omitted one small detail in the description above. After process A dies, process B can execute notifyOthers() again only once. The second time it never makes it out of the notify_all(). -- Gabriel Burca

Gabriel Burca escribió:
I'm using Boost 1.39 on WindowsXP and I noticed that if a process crashes while waiting on an interprocess condition variable, the signaling process blocks forever in subsequent calls to notify_all().
It looks to me like boost is not using the native facilities, but some emulation, so is this scenario not supported by the emulation?
Yes, it's a limitation of the emulation. Unblocking is not also guaranteed by native facilities. Best, Ion
participants (2)
-
Gabriel Burca
-
Ion Gaztañaga