[Boost-bugs] [Boost C++ Libraries] #8540: Named Condition Variable hanging.

Subject: [Boost-bugs] [Boost C++ Libraries] #8540: Named Condition Variable hanging.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-05-02 04:06:27

#8540: Named Condition Variable hanging.
 Reporter: ealfay@… | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.51.0
 Severity: Problem | Keywords:

 I am having problems with the shared memory code below. I can get this
 working on a Windows, MAC and OpenSUSE machine. However this same code
 does not work on my redhat v5.0 workstation machine.

 It appears to hang on the wait (condition variable). Any idea why this
 would be the case on this particular OS? I can't find anything online on
 the subject.

 Website of code:

 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <boost/interprocess/sync/named_mutex.hpp>
 #include <boost/interprocess/sync/named_condition.hpp>
 #include <boost/interprocess/sync/scoped_lock.hpp>
 #include <iostream>

 int main()
 managed_shm(boost::interprocess::open_or_create, "shm", 1024);
   int *i = managed_shm.find_or_construct<int>("Integer")(0);
 named_mtx(boost::interprocess::open_or_create, "mtx");
 named_cnd(boost::interprocess::open_or_create, "cnd");
   while (*i < 10)
     if (*i % 2 == 0)
       std::cout << *i << std::endl;

Ticket URL: <https://svn.boost.org/trac/boost/ticket/8540>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC