Documentation

Miri.Concurrency.Deadline

Deadline sweep and timeout callback protocol #

This follows ThreadManager::unblock_expired_deadlines in thread.rs. Host-clock reads are supplied as exact per-thread remaining durations; this module does not invent a clock or unit. It performs the source's full sweep before invoking timeout callbacks, keeps the minimum positive wait, and then exposes callback execution in thread-index order. A callback failure retains the mutated manager and stops the remaining callbacks, matching ? before active-thread restoration.

Exact result of Miri's host clock subtraction for one blocked thread. A zero duration means the deadline has expired.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          Instances For
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              The source mutates expired thread states during the sweep, before it starts calling any callbacks. outcome retains a source assertion or missing environment fact together with those prior mutations.

              Instances For
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  Equations
                  Instances For

                    Run the source's thread-index-ordered sweep. The observation list must contain the actual clock subtraction for each blocked deadline.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      Instances For
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          Instances For
                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For

                              Start callbacks only after a successful complete sweep. Every expired thread has already been set to Enabled.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For

                                Continue after one actual callback. A failed callback leaves its active thread selected and prevents later callbacks from running.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For