mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
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:
parent
47851f56ed
commit
cafea3d3da
1 changed files with 61 additions and 55 deletions
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue