           if let taskp = deferredTask(from: state)
           { // we need to execute the task
             self.queue.async {
-              taskp.pointee.task()
+              [self] in
+              withExtendedLifetime(self) { taskp.pointee.task(Resolver(self)) }
               taskp.deinitialize(count: 1)
               taskp.deallocate()
             }

    if let taskp = deferredTask(from: current)
    { // we need to execute the task
      self.queue.async {
        taskp.pointee.task()
        taskp.deinitialize(count: 1)
        taskp.deallocate()
      }


  /// Get a pointer to a `DeferredTask` that will resolve this `Deferred`

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