Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CoreBluetooth scan start/stop improvements #572

Merged
merged 1 commit into from
Jun 14, 2021

Conversation

dlech
Copy link
Collaborator

@dlech dlech commented Jun 10, 2021

This makes use of ObjC-style key-value observer to monitor the isScanning property on CBCentralManager. This allows us to avoid the polling wait.

Previously, the wait was only implemented when stopping scanning, so it is added to the start as well.

Also, the higher-level function is fixed to allow calling stop() multiple times without raising an error. This is needed since the
stop() method can be called by __aexit__() even if the scanner is already stopped.

This makes use of ObjC-style key-value observer to monitor the isScanning
property on CBCentralManager. This allows us to avoid the polling wait.

Previously, the wait was only implemented when stopping scanning, so it
is added to the start as well.

Also, the higher-level function is fixed to allow calling stop()
multiple times without raising an error. This is needed since the
stop() method can be called by __aexit__() even if the scanner is
already stopped.
@dlech dlech merged commit 3c3237b into hbldh:develop Jun 14, 2021
@dlech dlech deleted the mac-start-stop-scan branch June 14, 2021 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant