Boost Users :
From: Steven Wooding (steve.apo_at_[hidden])
Date: 2006-05-24 13:05:34
I'm on 64-bit Linux (SuSe 10.0) using the Intel compiler 9.0 or gcc 4.0.2.
Here is some rough code that may better explain what I'm trying to do:
int Fun1( bufferIndex, expectedProgressState, newProgressState, timeoutTime)
boost::shmem::shared_timed_mutex::scoped_timed_lock lock( mutex,
if (lock.locked() == true)
while ( mp_bufferIndex[bufferIndex].m_progressState
mp_bufferIndex[bufferIndex].m_bufferCondition.timed_wait( lock, timeoutTime)
// Timed out on condition
// Change the progress state
// mutex timed out
I hope this makes sense. In this test, the value of the
expectedProgressState is never true, in order to force the timeout.
Basically I obtain the mutex before we even wait on the condition variable.
Let me know if I've gone wrong with the pattern I'm using.
On 24/05/06, Ion Gaztañaga <igaztanaga_at_[hidden]> wrote:
> Hi Steve,
> Can you give me some more information about this? Platform, OS,
> compiler... If you could do a small test case it would be even better.
> Boost-users mailing list
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net