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

readonly stopReason is not threadsafe #12

Open
bluegaspode opened this issue Jan 15, 2011 · 0 comments
Open

readonly stopReason is not threadsafe #12

bluegaspode opened this issue Jan 15, 2011 · 0 comments

Comments

@bluegaspode
Copy link

Just synthesizing a readonly stopReason property is not thread-safe.

In all the AudioStreamers-Code the state is set first, followed by the stopReason.
Upon setting the state, the main thread gets a notification - if it then reads the stopReason it might see an old value, as the actual stopReason might have not been set yet.

At least the read-access to the stopReason should be synchronized - so the main-thread won't see stale data.
Or you change the order - set the stopReason first, followed by the state.

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

No branches or pull requests

1 participant