Subject: [Boost-bugs] [Boost C++ Libraries] #8008: boost named_condition under Windows
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-08 01:41:42
#8008: boost named_condition under Windows
---------------------------------+------------------------------------------
Reporter: mdellerus@⦠| Owner: igaztanaga
Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
Version: Boost 1.52.0 | Severity: Problem
Keywords: |
---------------------------------+------------------------------------------
Simple problem, reduced to it's simplest form.
== NamedConditionServer.cpp ==
{{{
#include <boost/interprocess/sync/named_mutex.hpp>
#include <boost/interprocess/sync/named_condition.hpp>
namespace ipc = boost::interprocess;
int main()
{
unsigned long long count = 0;
ipc::named_mutex myMutex( ipc::open_or_create,
"BoostConditionTestMutex" );
ipc::named_condition myCondition( ipc::open_or_create,
"BoostConditionTestCondition" );
ipc::scoped_lock<ipc::named_mutex> lock( myMutex );
for(;;)
{
myCondition.wait( lock );
std::cout << "Served # " << ++count << std::endl;
}
return 0;
}
}}}
== NamedConditionClient.cpp ==
{{{
#include <boost/interprocess/sync/named_mutex.hpp>
#include <boost/interprocess/sync/named_condition.hpp>
namespace ipc = boost::interprocess;
int main()
{
ipc::named_condition myCondition( ipc::open_or_create,
"BoostConditionTestCondition" );
myCondition.notify_one();
}
}}}
Under Linux, I can run the server in another window or the background and
it responds as expected when I run the client.
On Windows7 (Visual Studio 2012 Update 1) however, the server never wakes
up from the "wait".
I have tried under the debugger and have removed
"C:\ProgramData\boost_interprocess" between runs to no avail.
After running, there is just one "BoostConditionTestCondition" and just
one "BoostConditionTestMutex" file in the
"C:\ProgramData\boost_interprocess" tree.
This appears to be a bug to me, but I'd welcome suggestions to the
contrary.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8008> 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:11 UTC