       { // execution state has already been marked as begun
         return
       }
-    } while !CAtomicsCompareAndExchange(deferredState, &current, current | .executing, .weak, .acqrel, .acquire)
+      // write to `deferredState` with memory_order_release.
+      // this means that this write is in the release sequence of all previous writes.
+      // a subsequent read-from `deferredState` will therefore synchronize-with all previous writes.
+      // this matters for the `resolve(_:)` function, which operates on the queue of `Waiter` instances.
+    } while !CAtomicsCompareAndExchange(deferredState, &current, current | .executing, .weak, .release, .relaxed)
   }
 
   /// Set the `Result` of this `Deferred` and dispatch all notifications for execution.

      repeat {
        waiter.pointee.next = waiterQueue(from: state)
        let newState = Int(bitPattern: waiter) | state.state
        if CAtomicsCompareAndExchange(deferredState, &state, newState, .weak, .release, .relaxed)
        { // waiter is now enqueued; it will be deallocated at a later time by notifyWaiters()
          return

      // The atomic compare-and-swap operation uses memory order `.acqrel`.
      // "release" ordering ensures visibility of changes to `resolvedPointer(from:)` above to another thread.
      // "acquire" ordering ensures visibility of changes to `waiterQueue(from:)` below from another thread.
    } while !CAtomicsCompareAndExchange(deferredState, &current, final, .weak, .acqrel, .relaxed)

    precondition(current.isResolved == false)
    let waiters = waiterQueue(from: current)
