Is Core Bluetooth framework intrinsically asynchro

2020-07-25 10:29发布

问题:

When I utilize the CB framework in my app, I don't introduce any concurrency nor reactive approach and everything works fine. UI is not blocked when I receive over 100 samples per second from peripheral.

Does that mean it is designed to work asynchronously?

I haven't found any resources that states it's asynchronous nature, nor have I found any implementation where someone introduces dispatch async or background threads while working with Core Bluetooth.

Is it safe to say that Core Bluetooth framework is intrinsically asynchronous and one should not bother with dispatch_async and thing like that while working with Bluetooth on iOS?

EDIT:

this is how I initialize it

centralManager = CBCentralManager(delegate: self, queue: nil)
peripheralManager = CBPeripheralManager(delegate: self, queue: nil

So they apparently run in the main queue. How come it does not block the UI at all?