Cocoa Port:

- Don't completely block output threads when they are set to idle, since we need to assume that messages will be passed to them at any time. It seems like NSRunLoop is smart enough not to unnecessarily wake the CPU on idle, so the thread block was not necessary.
- Fix bug where user settings were not being applied while the emulator was paused. (Regression from r4970.)
This commit is contained in:
rogerman 2014-02-05 19:38:39 +00:00
parent 9f6f8c1cfd
commit 2c3db349c3
2 changed files with 0 additions and 17 deletions

View File

@ -63,7 +63,6 @@
{
NSThread *thread;
BOOL threadExit;
NSCondition *conditionIdle;
BOOL _idleState;
NSTimeInterval autoreleaseInterval;
NSPort *sendPort;

View File

@ -238,7 +238,6 @@ static NSDate *distantFutureDate = [[NSDate distantFuture] retain];
// Set up thread info.
thread = nil;
threadExit = NO;
conditionIdle = [[NSCondition alloc] init];
_idleState = NO;
autoreleaseInterval = interval;
@ -256,7 +255,6 @@ static NSDate *distantFutureDate = [[NSDate distantFuture] retain];
- (void)dealloc
{
[self forceThreadExit];
[conditionIdle release];
[super dealloc];
}
@ -264,13 +262,7 @@ static NSDate *distantFutureDate = [[NSDate distantFuture] retain];
- (void) setIdle:(BOOL)theState
{
OSSpinLockLock(&spinlockIdle);
_idleState = theState;
if (!theState)
{
[conditionIdle signal];
}
OSSpinLockUnlock(&spinlockIdle);
}
@ -293,14 +285,6 @@ static NSDate *distantFutureDate = [[NSDate distantFuture] retain];
do
{
[conditionIdle lock];
while ([self idle])
{
[conditionIdle wait];
}
[conditionIdle unlock];
NSAutoreleasePool *runLoopPool = [[NSAutoreleasePool alloc] init];
NSDate *runDate = [[NSDate alloc] initWithTimeIntervalSinceNow:[self autoreleaseInterval]];
[runLoop runUntilDate:runDate];