yield in Eventspaces
Yields control to event dispatching. See Eventspaces for details.
A handler procedure invoked by the system during a call to
yield can itself call yield, creating
an additional level of nested (but single-threaded) event handling.
See also
sleep/yield .
Dispatches an unspecified number of events, but only if the current thread is the current eventspace's handler thread (otherwise, there is no effect).
(yield -> void
wait-symbol)
wait-symbol : 'wait
When called in the handler thread of an eventspace, yields (processing events) until
no top-level windows in the eventspace are visible;
no timers in the eventspace are running; and
no callbacks are queued in the eventspace.
(When called in a non-handler thread, returns immediately.)
(yield -> void
sema)
sema : semaphore
Blocks on sema. If the current thread is the current
eventspace's handler thread, events are dispatched until a sema
wait succeeds on an event boundary. For other threads, calling
yield with a semaphore is equivalent to calling
semaphore-wait.
Always use (yield instead of a busy-wait loop.sema)