• Andrés G. Aragoneses's avatar
    Dap: add locking around DapSync.library_syncs field (bgo#614039) · 14c02083
    Andrés G. Aragoneses authored
    As the stacktrace in comment#3 of bug#614039 shows
    (https://bugzilla.gnome.org/show_bug.cgi?id=614039#c3)
    there may be more than one thread accessing this field,
    so we need locking around the code that modifies it and
    the code that iterates it.
    
    In regards to the Libraries property, as its public,
    we make it do a copy of the list before returning it
    to external consumers, but also locking while making
    the copy. Also, to prevent external consumers from
    modifying it (because they cannot hold the private
    lock), we make its type be IEnumerable instead of IList.
    
    This should prevent all data races around this field,
    and fixes the last part of bug bgo#614039.
    14c02083
Name
Last commit
Last update
..
Backends Loading commit data...
Clients Loading commit data...
Core Loading commit data...
Dap Loading commit data...
Extensions Loading commit data...
Hyena @ ba006f47 Loading commit data...
Libraries Loading commit data...
AssemblyInfo.cs.in Loading commit data...
Makefile.am Loading commit data...
create-extension Loading commit data...
generate-dbus-docs Loading commit data...
nuke-core-tables Loading commit data...
nuke-dev-keys Loading commit data...
nuke-gconf-keys Loading commit data...
run-banshee Loading commit data...