         }
       }
     }
+    
+    func shutdown() {
+      completionQueue.shutdown()
+    }
   }
 }
 

    }

    deinit {
      completionQueue.shutdown()
    }

    private func run() {
      let spinloopThreadQueue = DispatchQueue(label: "SwiftGRPC.ConnectivityObserver.run.spinloopThread")

      spinloopThreadQueue.async { [weak self] in
        guard let `self` = self else { return }

        while true  {
          guard let underlyingState = self.lastState.underlyingState else { return }
          

  ///
  /// - Parameter callback: block executed every time a new connectivity state is detected
  public func subscribe(callback: @escaping (ConnectivityState) -> Void) {
    connectivityObservers.append(ConnectivityObserver(underlyingChannel: underlyingChannel, currentState: connectivityState(), callback: callback))
  }
}

