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 Frith-MacDonald 1998-11-02 11:28:58 +00:00
parent 08192e83be
commit 1e295f8e39

View file

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