Documentation

Miri.Concurrency.Lifecycle

Ordered thread-finish and join-wakeup protocol #

This composes the source order in thread.rs::terminate_active_thread: beginTerminateActive marks the thread terminated and removes its TLS entries; the caller performs each TLS cleanup; this module then runs the selected termination hook; only then are joiners unblocked one at a time, with each callback executed in that joiner's active-thread context. Callback execution remains an external obligation.

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's chosen termination handler runs only after completeTlsCleanup has returned its continuation.

            Equations
            Instances For

              Execute the vector-clock termination hook against an explicitly supplied global state. The production state is not replaced by a fresh initial state.

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

                One wakeup iteration. Miri's unblock_thread invokes the callback synchronously; Lean exposes the exact callback action and leaves its effects to the interpreter.

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

                    Start ordered joiner wakeups after TLS and the selected termination hook have both completed.

                    Equations
                    Instances For
                      def Miri.Concurrency.ThreadManager.continueJoinerWakeups (managerAfterCallback : ThreadManager) (terminated : ThreadId) (callback : UnblockCallbackObligation) (remaining : List ThreadId) (returnedNormally : Bool) :

                      Continue after actually invoking one callback. On callback failure the source returns immediately, preserving the post-failure machine state and leaving later joiners blocked. On success the scheduler restores the previous active thread before issuing the next callback.

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