From f0a9912ae9b4b905071a053a20d05f29f3f53308 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 15 Mar 2010 19:25:57 +1300 Subject: [PATCH] core-foundation.run-loop: remove unnecessary yields. This fixes a thread starvation issue with game.input --- basis/core-foundation/run-loop/run-loop.factor | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/basis/core-foundation/run-loop/run-loop.factor b/basis/core-foundation/run-loop/run-loop.factor index c1316eaa16..14d701ba17 100644 --- a/basis/core-foundation/run-loop/run-loop.factor +++ b/basis/core-foundation/run-loop/run-loop.factor @@ -106,11 +106,11 @@ TUPLE: run-loop fds sources timers ; nano-count - 1,000 /f system-micros + ; : reset-timer ( timer -- ) - yield { - { [ run-queue deque-empty? not ] [ yield system-micros (reset-timer) ] } - { [ sleep-queue heap-empty? ] [ system-micros 1,000,000 + (reset-timer) ] } - [ sleep-queue heap-peek nip nano-count>micros (reset-timer) ] - } cond ; + { + { [ run-queue deque-empty? not ] [ system-micros ] } + { [ sleep-queue heap-empty? not ] [ sleep-queue heap-peek nip nano-count>micros ] } + [ system-micros 1,000,000 + ] + } cond (reset-timer) ; PRIVATE>