diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2015-01-04 05:00:28 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-01-04 05:00:28 +0900 |
commit | 0dd024a09fc4dd37a596a07e7ff0043537895909 (patch) | |
tree | 02f6bc4a614ed3dfe085c9d6c754385a88d58881 /src/core.go | |
parent | 0a6cb62169ebe1abb63aa5c70868df7c40441b1c (diff) |
Remove unnecessary delay on non/defered interactive mode
Diffstat (limited to 'src/core.go')
-rw-r--r-- | src/core.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core.go b/src/core.go index 4cdf79ad..7abee80a 100644 --- a/src/core.go +++ b/src/core.go @@ -77,6 +77,7 @@ func Run(options *Options) { pattern := patternBuilder([]rune(patternString)) looping := true + eventBox.Unwatch(EVT_READ_NEW) for looping { eventBox.Wait(func(events *Events) { for evt, _ := range *events { @@ -87,7 +88,6 @@ func Run(options *Options) { } } }) - time.Sleep(COORDINATOR_DELAY) } matches, cancelled := matcher.scan(MatchRequest{ @@ -116,6 +116,7 @@ func Run(options *Options) { // Event coordination reading := true ticks := 0 + eventBox.Watch(EVT_READ_NEW) for { delay := true ticks += 1 |