From 5767923ea54401ac031be9a90d9eb33db0a24722 Mon Sep 17 00:00:00 2001 From: rich_sposato Date: Tue, 1 May 2007 16:22:02 +0000 Subject: [PATCH] Added documentation comment describing thread race condition. git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@821 7ec92016-0320-0410-acc4-a06ded1c099a --- include/loki/SmartPtr.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/loki/SmartPtr.h b/include/loki/SmartPtr.h index 295335a..06296d5 100644 --- a/include/loki/SmartPtr.h +++ b/include/loki/SmartPtr.h @@ -485,6 +485,12 @@ namespace Loki /// \par Warning /// There could be a race condition, see bug "Race condition in RefCountedMTAdj::Release" /// http://sourceforge.net/tracker/index.php?func=detail&aid=1408845&group_id=29557&atid=396644 +/// As stated in bug 1408845, the Release function is not thread safe if a +/// SmartPtr copy-constructor tries to copy the last pointer to an object in +/// one thread, while the destructor is acting on the last pointer in another +/// thread. The existence of a race between a copy-constructor and destructor +/// implies a design flaw at a higher level. That race condition must be +/// fixed at a higher design level, and no change to this class could fix it. //////////////////////////////////////////////////////////////////////////////// template