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

Iteration of user settings is not thread safe #51

Open
TjazVracko opened this issue Nov 30, 2023 · 0 comments
Open

Iteration of user settings is not thread safe #51

TjazVracko opened this issue Nov 30, 2023 · 0 comments
Labels
type: bug Something is not working and must be fixed.

Comments

@TjazVracko
Copy link
Collaborator

See how user_settings_list_iter_start is implemented. It used global variables to keep track of the iteration.
This means 2 threads can not iterate at the same time.

This must be changes to use a "iter context", which is passed into the iterator functions.
What is now global must be part of that context.
The fix is quite simple.

The context must also be propagated up to the user_settings API - user_settings_iter_start, user_settings_iter_next, ...

@TjazVracko TjazVracko added the type: bug Something is not working and must be fixed. label Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something is not working and must be fixed.
Projects
None yet
Development

No branches or pull requests

1 participant