Iteration of user settings is not thread safe
TjazVracko opened this issue · 0 comments
TjazVracko commented
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
, ...