Description of the FRYSK Event Loop.
Overview
The FRYSK event-loop, in conjunction with {@link frysk.sys}, provide a
set of event driven interface to the linux kernel. The event-loop
directly handles the following events:
- timeouts and count-down timers
- signals
- file descriptors
Each is discussed below.
Timeouts and Count-Down Timers
The event loop provides both once-only, and repeating timers. See
{@link frysk.event.TimerEvent} for more information.
Signals
The event loop provides signal event notifiers. Note that a signal
event is delivered outside of the signal handler. See {@link
frysk.event.SignalEvent} for more information.
File Descriptors
The event loop provides file descriptor event notifiers. See {@link
frysk.event.PollEvent} for more information.
Process (wait) Events
By binding calls to {@link frysk.sys.Wait.waitNoHang} to the {@link
frysk.sys.Sig#CHLD} signal using a {@link frysk.event.SignalEvent},
wait
events can be processed by the event-loop.
Event Starvation
Event Starvation occurs when a single constantly re-occurring event is
dispatched in preference to other events. The frysk event-loop
addresses this by processing events using two distinct phases:
- accumulation of pending events
- dispatch of pending events
Doing this ensures that all existing pending events are processed
before any new events are scheduled.