mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
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:
parent
08192e83be
commit
1e295f8e39
1 changed files with 2 additions and 2 deletions
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue