improve logging of http comms and of deadlocks

This commit is contained in:
Richard Frith-Macdonald 2018-03-16 15:11:02 +00:00
parent 7c1b9b4d15
commit 81102fae85
5 changed files with 109 additions and 33 deletions

View file

@ -141,7 +141,7 @@
}\
if (EDEADLK == err)\
{\
_NSLockError(self, _cmd, YES);\
(*_NSLock_error_handler)(self, _cmd, YES);\
}\
}
@ -191,9 +191,11 @@ void _NSLockError(id obj, SEL _cmd, BOOL stop)
NSStringFromSelector(_cmd), obj);
NSLog(@"*** Break on _NSLockError() to debug.");
if (YES == stop)
pthread_mutex_lock(&deadlock);
pthread_mutex_lock(&deadlock);
}
NSLock_error_handler *_NSLock_error_handler = _NSLockError;
// Exceptions
NSString *NSLockException = @"NSLockException";
@ -269,7 +271,7 @@ MLOCK
}
if (EDEADLK == err)
{
_NSLockError(self, _cmd, NO);
(*_NSLock_error_handler)(self, _cmd, NO);
}
sched_yield();
} while ([limit timeIntervalSinceNow] > 0);