             }
             
             let peripheral = Peripheral(corePeripheral)
-            guard let continuation = self.central.continuation.discoverServices[peripheral] else {
-                assertionFailure("Missing continuation")
-                return
-            }
-            if let error = error {
-                continuation.resume(throwing: error)
-            } else {
-                let serviceObjects = corePeripheral.services ?? []
-                let services = serviceObjects.map { serviceObject in
-                    Service(
-                        service: serviceObject,
-                        peripheral: corePeripheral
-                    )
-                }
-                for (index, service) in services.enumerated() {
-                    self.central.cache.services[service] = serviceObjects[index]
-                }
-                continuation.resume(returning: services)
-            }
-            // remove callback
-            self.central.continuation.discoverServices[peripheral] = nil
+            
+            self.central.dequeue(for: peripheral) {
+                guard case let .discoverServices(operation) = $0 else {
+                    assertionFailure("Invalid continuation")
+                    return
+                }
+                if let error = error {
+                    operation.continuation.resume(throwing: error)
+                } else {
+                    let serviceObjects = corePeripheral.services ?? []
+                    let services = serviceObjects.map { serviceObject in
+                        Service(
+                            service: serviceObject,
+                            peripheral: corePeripheral
+                        )
+                    }
+                    for (index, service) in services.enumerated() {
+                        self.central.cache.services[service] = serviceObjects[index]
+                    }
+                    operation.continuation.resume(returning: services)
+                }
+            }
         }
         
         @objc(peripheral:didDiscoverCharacteristicsForService:error:)

        // if you specified the write type as `.withResponse`.
        let writeType: CBCharacteristicWriteType = operation.withResponse ? .withResponse : .withoutResponse
        peripheralObject.writeValue(operation.data, for: characteristicObject, type: writeType)
        return operation.withResponse
    }
    
    func execute(_ operation: Operation.DiscoverDescriptors) {

        context.queue.push(operation)
    }
    
    private func dequeue(for peripheral: Peripheral, _ body: (Operation) -> ()) {
        guard let context = self.central.continuation.peripherals[peripheral] else {
            assertionFailure("Missing context")
            return
        }
        context.queue.pop(body)
    }
    
    private func enqueueReadRSSI(_ operation: Operation.ReadRSSI, for peripheral: Peripheral) {
        let context = self.continuation.peripherals[peripheral] ?? PeripheralContinuationContext(self)
        context.readRSSI.push(operation)
    }
    
    private func dequeueReadRSSI(for peripheral: Peripheral, _ body: (Operation.ReadRSSI) -> ()) {
        guard let context = self.central.continuation.peripherals[peripheral] else {
            assertionFailure("Missing context")
            return
        }
        context.readRSSi.pop(body)
    }
    
    private func write(
