mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
tweak for OSX compatibility
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29480 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1a353d2514
commit
9f98d4c443
2 changed files with 30 additions and 23 deletions
|
@ -360,7 +360,7 @@ static NSArray *empty = nil;
|
|||
- (void) start
|
||||
{
|
||||
CREATE_AUTORELEASE_POOL(pool);
|
||||
NSException *e = nil;
|
||||
double prio = [NSThread threadPriority];
|
||||
|
||||
[internal->lock lock];
|
||||
NS_DURING
|
||||
|
@ -393,24 +393,33 @@ static NSArray *empty = nil;
|
|||
[self willChangeValueForKey: @"isExecuting"];
|
||||
internal->executing = YES;
|
||||
[self didChangeValueForKey: @"isExecuting"];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
[internal->lock unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
[internal->lock unlock];
|
||||
|
||||
NS_DURING
|
||||
NS_DURING
|
||||
{
|
||||
if (NO == [self isCancelled])
|
||||
{
|
||||
if (NO == [self isCancelled])
|
||||
{
|
||||
double prio = [NSThread threadPriority];
|
||||
|
||||
[NSThread setThreadPriority: internal->threadPriority];
|
||||
[self main];
|
||||
[NSThread setThreadPriority: prio];
|
||||
}
|
||||
[NSThread setThreadPriority: internal->threadPriority];
|
||||
[self main];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
e = localException;
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
[NSThread setThreadPriority: prio];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
|
||||
[internal->lock lock];
|
||||
NS_DURING
|
||||
{
|
||||
/* Notify KVO system of changes to isExecuting and isFinished
|
||||
*/
|
||||
[self willChangeValueForKey: @"isExecuting"];
|
||||
|
@ -424,17 +433,11 @@ static NSArray *empty = nil;
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
if (e == nil)
|
||||
{
|
||||
e = localException;
|
||||
}
|
||||
[internal->lock unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
[internal->lock unlock];
|
||||
if (e != nil)
|
||||
{
|
||||
[e raise];
|
||||
}
|
||||
RELEASE(pool);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue