Double locking check added in invalidation.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14535 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2002-09-24 05:42:32 +00:00
parent 47851f56ed
commit cafea3d3da

View file

@ -680,6 +680,8 @@ static Class runLoopClass;
} }
- (void) invalidate - (void) invalidate
{
if (valid == YES)
{ {
DO_LOCK(myLock); DO_LOCK(myLock);
if (valid == YES) if (valid == YES)
@ -707,6 +709,7 @@ static Class runLoopClass;
} }
DO_UNLOCK(myLock); DO_UNLOCK(myLock);
} }
}
- (BOOL) isValid - (BOOL) isValid
{ {
@ -1790,10 +1793,12 @@ static Class tcpPortClass;
} }
- (void) invalidate - (void) invalidate
{
if ([self isValid] == YES)
{ {
DO_LOCK(myLock); DO_LOCK(myLock);
if ([self isValid]) if ([self isValid] == YES)
{ {
NSMapTable *thePorts; NSMapTable *thePorts;
NSArray *handleArray; NSArray *handleArray;
@ -1836,6 +1841,7 @@ static Class tcpPortClass;
} }
DO_UNLOCK(myLock); DO_UNLOCK(myLock);
} }
}
- (BOOL) isEqual: (id)anObject - (BOOL) isEqual: (id)anObject
{ {