aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2011-03-16 02:23:20 -0400
committerBrian Cully <github.20.shmit@spamgourmet.com>2011-03-16 02:23:20 -0400
commit86793eaf2a753eccff2b3c9369ec542046b5f6a3 (patch)
tree1591ffb771908aa750c6e21a8eddae35bd97f7be
parent4ae12ef1a1297d98d997d4a2ab829a6f1b04af9b (diff)
downloadmoxie-86793eaf2a753eccff2b3c9369ec542046b5f6a3.tar.gz
moxie-86793eaf2a753eccff2b3c9369ec542046b5f6a3.zip
Don't check if lisp is loaded every time through the dispatch loop.
-rw-r--r--LispREPL.m17
1 files 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;