Use standard locks rathere than obsolete lazy lock classes

This commit is contained in:
Richard Frith-Macdonald 2018-04-10 14:59:35 +01:00
parent 6c3d99ea3f
commit 3ced3237e8
17 changed files with 63 additions and 36 deletions

View file

@ -424,7 +424,7 @@ static Class runLoopClass;
handle = (GSTcpHandle*)NSAllocateObject(self, 0, NSDefaultMallocZone());
handle->desc = d;
handle->wMsgs = [NSMutableArray new];
handle->myLock = [GSLazyRecursiveLock new];
handle->myLock = [NSRecursiveLock new];
#if defined(_WIN32)
ev = (WSAEVENT)CreateEvent(NULL,NO,NO,NULL);
if (ev == WSA_INVALID_EVENT)
@ -1452,7 +1452,7 @@ static Class tcpPortClass;
tcpPortMap = NSCreateMapTable(NSIntegerMapKeyCallBacks,
NSObjectMapValueCallBacks, 0);
[[NSObject leakAt: &tcpPortMap] release];
tcpPortLock = [GSLazyRecursiveLock new];
tcpPortLock = [NSRecursiveLock new];
[[NSObject leakAt: &tcpPortLock] release];
}
}
@ -1554,7 +1554,7 @@ static Class tcpPortClass;
port->events = NSCreateMapTable(NSIntegerMapKeyCallBacks,
NSIntegerMapValueCallBacks, 0);
#endif
port->myLock = [GSLazyRecursiveLock new];
port->myLock = [NSRecursiveLock new];
port->_is_valid = YES;
if (shouldListen == YES && [thisHost isEqual: aHost])