diff options
author | Brian Cully <bjc@kublai.com> | 2011-03-16 02:23:20 -0400 |
---|---|---|
committer | Brian Cully <github.20.shmit@spamgourmet.com> | 2011-03-16 02:23:20 -0400 |
commit | 86793eaf2a753eccff2b3c9369ec542046b5f6a3 (patch) | |
tree | 1591ffb771908aa750c6e21a8eddae35bd97f7be | |
parent | 4ae12ef1a1297d98d997d4a2ab829a6f1b04af9b (diff) | |
download | moxie-86793eaf2a753eccff2b3c9369ec542046b5f6a3.tar.gz moxie-86793eaf2a753eccff2b3c9369ec542046b5f6a3.zip |
Don't check if lisp is loaded every time through the dispatch loop.
-rw-r--r-- | LispREPL.m | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -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; |