From 62dc83981939800d9b784c4acfd6d9b491dc6055 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Wed, 5 May 2010 21:46:54 +0200 Subject: [PATCH] =?UTF-8?q?Use=20ACE=5FGUARD=5FRETURN=20macro=20in=20Locke?= =?UTF-8?q?dQueue::next=20to=20guarrantee=20the=20lock=20is=20acquired=20b?= =?UTF-8?q?efore=20changing=20the=20queue=C2=B4s=20properties?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : trunk --- src/shared/LockedQueue.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/LockedQueue.h b/src/shared/LockedQueue.h index c07ffcacb0..fd0a0d5d22 100644 --- a/src/shared/LockedQueue.h +++ b/src/shared/LockedQueue.h @@ -68,7 +68,8 @@ namespace ACE_Based //! Gets the next result in the queue, if any. bool next(T& result) { - ACE_Guard g(this->_lock); + // ACE_Guard g(this->_lock); + ACE_GUARD_RETURN (LockType, g, this->_lock, false); if (_queue.empty()) return false;