You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Shared condition variable is invalid after the waiting process crashes #109
I have two processes, synchronized using a condition variable in shared memory.
If the process that calls wait crashes, the notifying process sometimes blocks in the notify call.
This happens on windows, using visual C++.
As far as I understand, this is because the waiting thread is supposed to unlock the internal mutex of the condition, but it doesn't get to. (The generic emulation implemetation is being used)
Any suggestions to work around this?
A straightforward thing to do would be to allow for a timeout in the notify method. What do you think?
There is no robust condition variable implementation in any OS, and AFIAK a known custom implementation that handles it correctly, so there is not much Boost.Interprocess can do with it, sorry.
Activity
igaztanaga commentedon Jun 2, 2020
Doesn't BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING help?
wangbinio commentedon Dec 10, 2023
@ianosd ,hello,i meet the same question. have you solve it?
#200 (comment)
igaztanaga commentedon Jan 7, 2026
There is no robust condition variable implementation in any OS, and AFIAK a known custom implementation that handles it correctly, so there is not much Boost.Interprocess can do with it, sorry.