Execution Control

With iceoryx2, developers have complete control over the execution of their applications.

There are no background threads; all house-keeping operations are carried out in the application threads. They occur either through usual interaction with the API (opening services, sending or receiving data, etc.) which provides a frictionless default user experience, or through deliberate calls made to house-keeping functions when more control is required.

This control over execution is essential for safety-critical contexts where determinism is paramount. It enables predictable resource usage, precise timing control, and lends itself to real-time analysis and certification processes.

Waitset

The Waitset is an optional component that facilitates the setup of reactive processing loops in user threads.

Worker Thread Interval Timer 10 ms · TICK! Listener Port /sensors · NEW DATA File Descriptor fd: 7 · waiting Deadline Timer 500 ms · pending Waitset Event Queue Timer Data empty slots select epoll poll WSAPoll … inotify kqueue platform specific wake up BLOCKED waitset.wait() ACTIVE process events more events? wake done yes no

Event Multiplexing via Waitset

Various event sources (depending on the platform) can be attached to the Waitset, which takes care of putting the thread to sleep and waking it up when events occur on any of them. This functionality is achieved using the available event multiplexing facilities of the platform.

This approach conserves CPU while maintaining responsive event processing, however, the sleep-wake-up behaviour may introduce additional latency depending on the implementation of the platform’s event multiplexing facilities.

Possible event sources that can be attached to a Waitset could include:

  1. Interval timers

  2. Deadline timers

  3. Listener ports

  4. File-descriptor-based event sources (on compatible platforms)

Further Reading

Understand the Communication Model

Get familiar with the components involved with establishing communication.

Communication Model
Example: Event Signalling

See how to coordinate participants with events.

https://github.com/eclipse-iceoryx/iceoryx2/tree/main/examples/rust/event
Example: Event Multiplexing (Rust)

See how to use the WaitSet in your application.

https://github.com/eclipse-iceoryx/iceoryx2/tree/main/examples/rust/event_multiplexing