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

Add openSharedStream() to prevent deletion while executing onError callbacks #821

Merged
merged 4 commits into from
May 1, 2020

Conversation

philburk
Copy link
Collaborator

@philburk philburk commented Apr 15, 2020

Fixes #820

To prevent race conditions with the onError callbacks
that were resulting in the use of a deleted stream.

For bug #820
Also added a sleep to provoke a race condition. Should be removed.
include/oboe/AudioStream.h Outdated Show resolved Hide resolved
Also use a friend class to hide ssetWeakThis().
Copy link
Collaborator

@dturner dturner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much for making these changes! LGTM.

src/common/AudioStreamBuilder.cpp Outdated Show resolved Hide resolved
include/oboe/AudioStreamBuilder.h Outdated Show resolved Hide resolved
Changed openSharedStream() to openStream().
Remove version with ResultWithValue<shared_ptr>
Bump oboe version to 1.4.0
Bump oboetester version to 1.5.24
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.

AudioStreamCallback design prone to race conditions
3 participants