manolofdez / AsyncBluetooth

A small library that adds concurrency to CoreBluetooth APIs.
MIT License
168 stars 31 forks source link

maybe fix possible data race #8

Closed oliverepper closed 2 years ago

oliverepper commented 2 years ago

I am not quite sure about this but I think the original code could miss a first state change the way it was. It is quite possible that staring CBCentral is slow enough for this to never happen, though. Please explain to me why my change is unnecessary, if that is the case.

manolofdez commented 2 years ago

I see no reason not to pass in the delegate if we already have it (especially if it's in the designated init).