mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
improve logging of http comms and of deadlocks
This commit is contained in:
parent
7c1b9b4d15
commit
81102fae85
5 changed files with 109 additions and 33 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue