Comments (5)
Would this issue ever get fixed? It has been there for almost a decade.
I spent one whole day to add named_mutex and named_condition to my windows apps, and then found out this issue forcing me to look for other solutions.
from interprocess.
It exists on any OS. Because the default named_mutex is spin_wait, you can view the source code, there is macro to change internal implementation. You can change it to posix pthread_mutex on macOS, now it update to robust mutex, maybe you need to update the source code.
from interprocess.
Changed the posix mutex implementation to be robust #66
from interprocess.
#if defined(BOOST_INTERPROCESS_USE_POSIX_SEMAPHORES)
typedef ipcdetail::posix_named_mutex internal_mutex_type;
#undef BOOST_INTERPROCESS_USE_POSIX_SEMAPHORES
#elif defined(BOOST_INTERPROCESS_USE_WINDOWS)
typedef ipcdetail::windows_named_mutex internal_mutex_type;
#undef BOOST_INTERPROCESS_USE_WINDOWS
#else
typedef ipcdetail::shm_named_mutex internal_mutex_type;
#endif
But define BOOST_INTERPROCESS_USE_POSIX_SEMAPHORES, boost using the posix semaphore, deadlock are also possible. You should use posix_mutex shared in process, but named_mutex dont't use posix_mutex. I did it myself...
from interprocess.
I'm also wondering why the PR #66 was closed without ever being merged. Running into this problem is quite annoying when a known solution has existed for so long!
from interprocess.
Related Issues (20)
- open_or_create stuck in retry loop indefinitely on macOS aarch64 if retries are enabled HOT 1
- [vectorstream] basic_vectorbuf segmentation fault when exceeding INT_MAX elements HOT 1
- managed_windows_shared_memory crash on destruction
- Floating Point Exception if Alignment is Multiple of 256 HOT 1
- Extremly slow performance when constructing large arrays of basic type
- namespace conflict on constructing objects in segment manager with named proxy in combination with boost geometry HOT 1
- x86 inline assembly should provide an alternative for Intel syntax
- missing/misused m_is_wide in char_wchar_holder assignment operators
- Condition variable and Mutex blocks after one process crashes and restart HOT 1
- Memory allocation docs reference dead website HOT 1
- Local memory only implementation HOT 2
- boost.interprocess seems to have a bug. HOT 2
- boost::interprocess::named_condition compile error on Visual Studio 2022
- Constructing vector of POD using boost interprocess throws exception only in debug mode
- There is a bug in boost/interprocess/detail/os_thread_function.hpp
- Bug in boost::interprocess::ipcdetail::sync_handles::obtain_mutex
- Using `message_queue` with `windows_shared_memory`
- `message_queue::timed_receive` block process a long duration than expect when `system time` jumb back
- Modular Boost C++ Libraries Request HOT 1
- Alignment problem with boost/interprocess/segment_manager on SPARC 32Bit / Boost 1.84 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from interprocess.