From 86793eaf2a753eccff2b3c9369ec542046b5f6a3 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Wed, 16 Mar 2011 02:23:20 -0400 Subject: Don't check if lisp is loaded every time through the dispatch loop. --- LispREPL.m | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/LispREPL.m b/LispREPL.m index 87e4f4f..90bd08b 100644 --- a/LispREPL.m +++ b/LispREPL.m @@ -267,17 +267,18 @@ sig_child(int signo) - (void)dispatchREPLResults: (NSNotification *)resultsNotification { [theDispatcherLock lock]; + if (theLispIsLoaded == NO) { + NSNotificationCenter *defaultCenter; + theLispIsLoaded = YES; + + defaultCenter = [NSNotificationCenter defaultCenter]; + [defaultCenter postNotificationName: LispFinishedLoadingNotification + object: self]; + } + while ([theREPLResults count] > 0) { id result; - if (theLispIsLoaded == NO) { - NSNotificationCenter *defaultCenter; - theLispIsLoaded = YES; - - defaultCenter = [NSNotificationCenter defaultCenter]; - [defaultCenter postNotificationName: LispFinishedLoadingNotification - object: self]; - } result = [theREPLResults objectAtIndex: 0]; if ([result isKindOfClass: [NSArray class]]) { NSString *command; -- cgit v1.2.3