Process pending thread events when unblocking them.
authorTaylor R Campbell <campbell@mumble.net>
Wed, 29 May 2019 04:10:57 +0000 (04:10 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Wed, 29 May 2019 04:58:12 +0000 (04:58 +0000)
commitb0b11d54bc0d0cf639ca7205fc8e3396e4fd6807
treefe13b87420818d9a6773e31b3422eba87d9e7db0
parent8f4e491fd35266b0c052866a1476c57d4a292a68
Process pending thread events when unblocking them.

Partly fixes bug where profiler never got a chance to run when the
program was doing most of its work in short routines that block and
unblock thread events, like opening and closing files.

Only partly, because it seems something else unblocks thread events
without processing them -- until we do another block/unblock cycle as
in channel-close.  Verified that very little time is actually spent
in channel-close; haven't yet tracked down who the culprit is.
src/runtime/thread.scm