From 7a91aabcfa58ee847b0d067f65ef5fab62c467ee Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Mon, 11 Apr 2011 21:47:07 +0000 Subject: QPID-3199: Locking error qpid::sys::StateMonitor git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1091224 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/StateMonitor.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/sys/StateMonitor.h b/cpp/src/qpid/sys/StateMonitor.h index 5a92756f3a..b74195fb8d 100644 --- a/cpp/src/qpid/sys/StateMonitor.h +++ b/cpp/src/qpid/sys/StateMonitor.h @@ -60,13 +60,13 @@ class StateMonitor : public Waitable operator Enum() const { return state; } /** @pre Caller holds a ScopedLock */ - void waitFor(Enum s) { ScopedWait(*this); while (s != state) wait(); } + void waitFor(Enum s) { ScopedWait w(*this); while (s != state) wait(); } /** @pre Caller holds a ScopedLock */ - void waitFor(Set s) { ScopedWait(*this); while (!s.test(state)) wait(); } + void waitFor(Set s) { ScopedWait w(*this); while (!s.test(state)) wait(); } /** @pre Caller holds a ScopedLock */ - void waitNot(Enum s) { ScopedWait(*this); while (s == state) wait(); } + void waitNot(Enum s) { ScopedWait w(*this); while (s == state) wait(); } /** @pre Caller holds a ScopedLock */ - void waitNot(Set s) { ScopedWait(*this); while (s.test(state)) wait(); } + void waitNot(Set s) { ScopedWait w(*this); while (s.test(state)) wait(); } private: Enum state; -- cgit v1.2.1