Improved locking

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3159 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1998-11-02 11:28:58 +00:00
parent ef8961b958
commit 76c8b1c762

View file

@ -83,13 +83,13 @@ static NSPortNameServer *defaultServer = nil;
{ {
if (self == [NSPortNameServer class]) if (self == [NSPortNameServer class])
{ {
[gnustep_global_lock lock];
serverLock = [NSRecursiveLock new]; serverLock = [NSRecursiveLock new];
[serverLock lock];
if (modes == nil) if (modes == nil)
{ {
modes = [[NSArray alloc] initWithObjects: &mode count: 1]; modes = [[NSArray alloc] initWithObjects: &mode count: 1];
} }
[serverLock unlock]; [gnustep_global_lock unlock];
} }
} }