Thread joining and completion obligations #
This follows concurrency/thread.rs::join_thread and
join_thread_exclusive. It mutates the join status before waiting and leaves the
completion synchronization and return-place write as ordered obligations.
The source's actual callback and pointer write remain
external actions; this module cannot silently complete them.
A join's opaque MIR scalar and destination place, preserved for the interpreter callback that eventually writes the return value.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- none : JoinHandler
- vectorClocks : JoinHandler
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
- thread (error : ThreadError) : JoinError
- detachedThreadUb (thread : ThreadId) : JoinError
- alreadyJoinedExclusiveUb (thread : ThreadId) : JoinError
- selfJoinUb (thread : ThreadId) : JoinError
- exclusiveJoinHasOtherWaiter (thread : ThreadId) : JoinError
- callbackUnblockedWithTimeout : JoinError
- callbackTokenMismatch (expected actual : Nat) : JoinError
- callbackTargetMismatch (expected actual : ThreadId) : JoinError
- callbackReasonMismatch (expected actual : BlockReason) : JoinError
- wrongHandler : JoinError
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
- handlerMismatch : JoinCompletionError
- callbackUnblockedWithTimeout : JoinCompletionError
- globalStateRequired : JoinCompletionError
- globalState (error : GlobalStateError) : JoinCompletionError
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
join_thread's after_join work, in source order. The selected handler
must run before the interpreter writes the scalar to the destination.
- joiner : ThreadId
- joinee : ThreadId
- callbackToken : Nat
- returnValue : JoinReturn
- handler : JoinHandler
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
- completedImmediately (manager : ThreadManager) (completion : JoinCompletionObligation) : JoinPlan
- waiting (manager : ThreadManager) (callback : JoinCompletionObligation) : JoinPlan
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- (Miri.Concurrency.JoinPlan.completedImmediately a a_1).manager = a
- (Miri.Concurrency.JoinPlan.waiting a a_1).manager = a
Instances For
Prepare the ordinary Miri join. The active thread is the joiner. The caller supplies the callback token allocated by its interpreter layer.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Miri's exclusive join checks the existing Joined status, self-join, and absence of other waiters before taking the ordinary path.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Apply the join completion callback after an actual Ready unblock. The callback does not claim synchronization or write success; it produces a continuation requiring those effects in the exact source order.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.