Hello,
I am using boost condition_variables to block while waiting for an asynchronous response. I am seeing an error that happens at random whenever I am releasing the lock just before calling notify_one. The error goes away if I keep the lock and release after notify_one.
Here is the code:
class BlockingRequest{
public:
// predicate class
class ResponseStatus
{
public:
ResponseStatus( bool& received ) : m_received( received )
{
}
bool operator()() const
{
return m_received;
}
private:
bool& m_received;
};
//blocking request