         let semaphore = self.semaphore(for: characteristic.peripheral)
         await semaphore.wait()
         defer { semaphore.signal() }
-        self.log("Peripheral \(characteristic.peripheral) will read characteristic \(characteristic.uuid)")
-        return try await withCheckedThrowingContinuation { [weak self] continuation in
+        let peripheral = characteristic.peripheral
+        self.log("Peripheral \(peripheral) will read characteristic \(characteristic.uuid)")
+        return try await withThrowingContinuation(for: peripheral) { [weak self] continuation in
             guard let self = self else { return }
             self.async {
-                let peripheral = characteristic.peripheral
                 // get peripheral
                 guard let peripheralObject = self.cache.peripherals[peripheral] else {
                     continuation.resume(throwing: CentralError.unknownPeripheral)

        type: CBCharacteristicWriteType,
        for characteristic: Characteristic<Peripheral, AttributeID>
    ) async throws {
        return try await withCheckedThrowingContinuation { [weak self] continuation in
            guard let self = self else { return }
            self.async {
                let peripheral = characteristic.peripheral

    private func waitUntilCanSendWriteWithoutResponse(
        for peripheral: Peripheral
    ) async throws {
        return try await withThrowingContinuation(for: peripheral) { [weak self] continuation in
            guard let self = self else { return }
            self.async {
                // get peripheral
