Moved the call to yield-current-thread. It is otherwise redundant
with all the i/o and timer event polling in thread-timer-interrupt-
handler, the other caller of yield-thread.
(define (yield-current-thread)
(without-interrupts
(lambda ()
+ (maybe-signal-io-thread-events)
(call-with-current-thread #t
(lambda (thread)
;; Allow preemption now, since the current thread has
(yield-thread thread))))))
(define (yield-thread thread #!optional fp-env)
- (maybe-signal-io-thread-events)
(let ((next (thread/next thread)))
(%trace ";yield-thread: "thread" yields to "next"\n")
(if (not next)