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
|
@ -681,6 +681,8 @@ static Class runLoopClass;
|
||||||
|
|
||||||
- (void) invalidate
|
- (void) invalidate
|
||||||
{
|
{
|
||||||
|
if (valid == YES)
|
||||||
|
{
|
||||||
DO_LOCK(myLock);
|
DO_LOCK(myLock);
|
||||||
if (valid == YES)
|
if (valid == YES)
|
||||||
{
|
{
|
||||||
|
@ -706,6 +708,7 @@ static Class runLoopClass;
|
||||||
[[self sendPort] removeHandle: self];
|
[[self sendPort] removeHandle: self];
|
||||||
}
|
}
|
||||||
DO_UNLOCK(myLock);
|
DO_UNLOCK(myLock);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) isValid
|
- (BOOL) isValid
|
||||||
|
@ -1791,9 +1794,11 @@ 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;
|
||||||
|
@ -1835,6 +1840,7 @@ static Class tcpPortClass;
|
||||||
[super invalidate];
|
[super invalidate];
|
||||||
}
|
}
|
||||||
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