diff options
Diffstat (limited to 'cpp/src/qpid/client/FutureCompletion.cpp')
-rw-r--r-- | cpp/src/qpid/client/FutureCompletion.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/cpp/src/qpid/client/FutureCompletion.cpp b/cpp/src/qpid/client/FutureCompletion.cpp index 6fc3d5f088..130c65d6aa 100644 --- a/cpp/src/qpid/client/FutureCompletion.cpp +++ b/cpp/src/qpid/client/FutureCompletion.cpp @@ -24,9 +24,9 @@ using namespace qpid::client; using namespace qpid::sys; -FutureCompletion::FutureCompletion() : complete(false), closed(false), code(0) {} +FutureCompletion::FutureCompletion() : complete(false) {} -bool FutureCompletion::isComplete() +bool FutureCompletion::isComplete() const { Monitor::ScopedLock l(lock); return complete; @@ -39,23 +39,10 @@ void FutureCompletion::completed() lock.notifyAll(); } -void FutureCompletion::waitForCompletion() +void FutureCompletion::waitForCompletion() const { Monitor::ScopedLock l(lock); - while (!complete && !closed) { + while (!complete) { lock.wait(); } - if (closed) { - throw ChannelException(code, text); - } -} - -void FutureCompletion::close(uint16_t _code, const std::string& _text) -{ - Monitor::ScopedLock l(lock); - complete = true; - closed = true; - code = _code; - text = _text; - lock.notifyAll(); } |