Subject: [Boost-bugs] [Boost C++ Libraries] #6976: Waiting on boost interprocess condition consumes 100% CPU on Windows
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-06-10 00:03:26
#6976: Waiting on boost interprocess condition consumes 100% CPU on Windows
------------------------------------------------+---------------------------
Reporter: tmf83 <tmf83@â¦> | Owner: igaztanaga
Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
Version: Boost 1.49.0 | Severity: Problem
Keywords: interprocess condition cpu windows |
------------------------------------------------+---------------------------
The problem arises when several threads of several processes waits on same
condition. For example, we have application in which we create several
threads with thread function like this:
{{{
while (_running)
{
boost::interprocess::scoped_lock<boost::interprocess::interprocess_mutex>
lock ( _shm->mutex ) ; // _shm - shared memory
_shm->condition.wait ( lock ) ; // condition is
boost::interprocess::interprocess_condition
}
}}}
In main function we simply create several threads, sleep for a some time
and stop threads. If we create 4 threads and start 2 applications, or
create 3 threads and start 3 applications, or create 2 threads and start 4
applications then we get this problem. Its funny that the problem arising
depends on quantity of threads and processes which we start.
This is tested on windows 7, windows xp. No problem on Linux system
(Debian squeeze)
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6976> 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:09 UTC