Commit cffe6b28 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - made wait() const

parent 2458827e
......@@ -34,7 +34,7 @@ WCondition::~WCondition()
// cleanup
}
void WCondition::wait()
void WCondition::wait() const
{
m_condition.wait( m_mutex );
}
......
......@@ -49,7 +49,7 @@ public:
/**
* Wait for the condition. Sets the calling thread asleep.
*/
virtual void wait();
virtual void wait() const;
/**
* Notifies all waiting threads.
......@@ -61,12 +61,12 @@ protected:
/**
* The condition.
*/
boost::condition_variable_any m_condition;
mutable boost::condition_variable_any m_condition;
/**
* The mutex used for the condition.
*/
boost::shared_mutex m_mutex;
mutable boost::shared_mutex m_mutex;
private:
};
......
......@@ -44,7 +44,7 @@ WConditionOneShot::~WConditionOneShot()
}
}
void WConditionOneShot::wait()
void WConditionOneShot::wait() const
{
// now we wait until the write lock is released and we can get a read lock
boost::shared_lock<boost::shared_mutex> slock = boost::shared_lock<boost::shared_mutex>( m_mutex );
......
......@@ -54,7 +54,7 @@ public:
/**
* Wait for the condition. Sets the calling thread asleep.
*/
virtual void wait();
virtual void wait() const;
/**
* Notifies all waiting threads.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment