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

Sync updates #9

Merged
merged 2 commits into from
Oct 15, 2024
Merged

Sync updates #9

merged 2 commits into from
Oct 15, 2024

Conversation

pblazej
Copy link
Contributor

@pblazej pblazej commented Sep 27, 2024

Buffer updates are designed to be async, however the properties themselves are not isolated. The use of async keyword creates a suspension point and can change execution context (effectively updating from the thread pool/multiple threads):

Screenshot 2024-09-27 at 08 22 23

which is then clearly visible under Thread Sanitizer:

Screenshot 2024-09-27 at 08 19 30

The current solution is equivalent to main thread updates.
Otherwise, we'd need to block the main thread to swap them and then access synchronously inside draw(), which is probably not worth the effort.

@aure aure merged commit 357de19 into AudioKit:main Oct 15, 2024
3 checks passed
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.

2 participants