     
     public let didDisconnect: AsyncStream<Peripheral>
     
+    /// Currently scanned devices, or restored devices.
     public func peripherals() async -> Set<Peripheral> {
         return await withUnsafeContinuation { [weak self] continuation in
             guard let self = self else { return }
-            self.queue.async {
+            self.async {
                 let peripherals = Set(self.cache.peripherals.keys)
                 continuation.resume(returning: peripherals)
             }

    ) -> AsyncThrowingStream<Data, Error> {
        return AsyncThrowingStream(Data.self, bufferingPolicy: .bufferingNewest(100)) { [weak self] continuation in
            guard let self = self else { return }
            self.queue.async {
                let peripheral = characteristic.peripheral
                // get peripheral
                guard let peripheralObject = self.cache.peripherals[peripheral] else {

    
    private func log(_ message: String) {
        continuation.log.yield(message)
    }
    
    private func async(_ body: @escaping () -> ()) {
        
        // use specified queue
        if let queue = self.queue {
            queue.async(execute: body)
        } else if Thread.isMainThread {
            // when no queue is specified, the main thread is used
            body()
        } else {
            // force to use main thread if none specified but calling from another thread
            DispatchQueue.main.async(execute: body)
        }
    }
    
    private func write(
