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

Prevent callback after close by sleeping before close #967

Closed
philburk opened this issue Aug 5, 2020 · 0 comments · Fixed by #970
Closed

Prevent callback after close by sleeping before close #967

philburk opened this issue Aug 5, 2020 · 0 comments · Fixed by #970
Assignees
Labels

Comments

@philburk
Copy link
Collaborator

philburk commented Aug 5, 2020

See #953

I could only reproduce this when using Bluetooth.

I then tried calling usleep(N*1000) before the stream is closed.
N. crashes:tries
10 => 0:10
5 => 0:10
1 => 1:10 in onDeviceUpdate()
no => 8:11

So it is a pretty tight race. It seems a short delay right before the close is enough to prevent the race. Five msec works OK but ten msec should be a safer value.

Add a sleep in the Oboe close method.

Originally posted by @philburk in #953 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant