Module sync42::monitor

source ·
Expand description

Implementation of a monitor in classic Hoare-style.

A monitor allows for synchronization that is more concurrent than just using mutexes and condition variables. Concretely, MonitorCore breaks the task into the coordination and the critical section. Threads can concurrently coordinate the next-best thread to enter the citical section via the coord type, without blocking the critical section from executing.

Structs§

  • A monitor takes a MonitorCore and the associated coordination and critical section types, and creates a monitor out of it.

Traits§

  • The core traits of the monitor. Acquire the monitor, enter the critical section, release the monitor.