       // 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.tag != .resolved)
-    if let waiters = waiterQueue(from: current)
+    } while !CAtomicsCompareAndExchange(deferredState, &state, final, .weak, .acqrel, .relaxed)
+
+    precondition(state.tag != .resolved)
+    if let waiters = waiterQueue(from: state)
     {
       notifyWaiters(queue, waiters, result)
     }
-    else if let taskp = deferredTask(from: current)
+    else if let taskp = deferredTask(from: state)
     {
       taskp.deinitialize(count: 1)
       taskp.deallocate()

  private func deferredTask(from state: Int) -> UnsafeMutablePointer<DeferredTask<Success, Failure>>?
  {
    guard state.tag == .waiting else { return nil }
    return state.ptr?.assumingMemoryBound(to: DeferredTask.self)
  }

  /// Get a pointer to a `Result` for a resolved `Deferred`.


  public func beginExecution()
  {
    var state = CAtomicsLoad(deferredState, .relaxed)
    repeat {
      guard state.tag == .waiting else { return }
      // execution state has not yet been marked as begun

      // read-modify-write `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, &state, .executing, .weak, .release, .relaxed)

    if let taskp = deferredTask(from: state)
    { // we need to execute the task
      self.queue.async {
        [self] in
