The SENF Scheduler Library

The Scheduler Library provides a single-threaded application event-loop multiplexing multiple event sources.

The Scheduler

     →  see senf::scheduler

The scheduler provides a single threaded event dispatch architecture with reliable task queueing using FIFO scheduling. The scheduler provides event handling for

  • File descriptors
  • Timers
  • UNIX signals

The ClockService

     →  see senf::ClockService

To support precise event timing, the senf::ClockService class implements a reliable monotonous time source. It is based on the high precision POSIX clock and adds support for reliable conversion between an abstract clock type and absolute date/time

Miscellaneous helpers

To ease the use of the Scheduler there are some additional helpers managing callbacks and registrations.

  • senf::ReadHelper reads data from an arbitrary file descritor until a use specified condition is met (e.g. number of chars read or a specific character sequence is found in the input).
  • senf::WriteHelper writes data to an arbitrary file descriptor until all provided data has been written.

Implementation

     →  see The Scheduler Implementation

senf::Scheduler is only a wrapper around the real implementation. The real implementation is now based on a modular dispatcher architecture