mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MIT-Scheme-devel] Fix suspend-current-thread to NOT leave events unbloc


From: Matt Birkholz
Subject: [MIT-Scheme-devel] Fix suspend-current-thread to NOT leave events unblocked.
Date: Fri, 29 Jul 2016 23:55:04 -0700

I pushed commit e47eaee (Fix suspend-current-thread to NOT leave
events unblocked.) with a bogus title.  I eventually realized that
call-with-current-continuation and %within-continuation were
co-operating to save/restore the block-events? flag.

What I was actually after, as the rest of the message says, was
getting the event that woke a thread to run before suspend-current-
thread returns.  I found it surprising (confusing) for an event
processing loop to wake but find no events had run (most times, timer
interrupt willing), then loop to suspend again before the event runs
(again modulo the thread timer).

So my patch is less a fix and more an optimization for my expected
typical use.  If the previous behaviour is preferred for any reason, I
can undo it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]