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).
When called in the handler thread of an eventspace, yields (processing events) until
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 sema) instead of a busy-wait loop.