gtk: Fixed spin in gtk-test after test-process.
authorMatt Birkholz <matt@birkholz.chandler.az.us>
Tue, 24 Jul 2012 05:02:48 +0000 (22:02 -0700)
committerMatt Birkholz <matt@birkholz.chandler.az.us>
Tue, 24 Jul 2012 05:02:48 +0000 (22:02 -0700)
commit8aeb6e744abfe149dabfbde64486baa486ebe076
treecea919daf7c8b6af7c96e0a1e7ce6746d31c744e
parentefb9b07815588de4dfd1d4a4293092d21d2a2a8a
gtk: Fixed spin in gtk-test after test-process.

Re-enabled the runtime/test-process tests.  Added maybe-signal-io-
thread-events to yield-thread, and made it unconditionally test-
select-registry, even if there are no io-registrations.  In gtk-test,
the main thread sleeps and the gtk-thread runs alone.  Neither
registers for io or process status change events, yet gtk-thread needs
subprocess-global-status-tick to happen anyway (else run_gtk
immediately returns PROCESS-STATUS-CHANGE and gtk-thread spins).

Assumed that maybe-signal-io-thread-events could be fixed by allowing
it to test-select-registry even when the registry is empty.

Moved all subprocess status change work into handle-subprocess-status-
change, which now calls subprocess-global-status-tick and compares the
latest tick to the tick saved last time.  When statuses have changed
since the last tick, it polls process statuses (and closes i/o) and
un-suspend waiters.  The former was only done for NT, but does not
hurt on Unix.  The latter is accomplished by the new signal-
subprocess-status-change procedure.  All other calls to subprocess-
global-status-tick were redundant, or were replaced by calls to
handle-subprocess-status-change.
src/gtk/thread.scm
src/runtime/io.scm
src/runtime/process.scm
src/runtime/runtime.pkg
src/runtime/thread.scm
tests/check.scm