Revision 627092

Go back to digest for 28th January 2007

Other in KDE-PIM

Will Stephenson committed changes in /branches/KDE/3.5/kdepim/kresources/remote/resourceremote.cpp:

This patch uses the resource's own KABC::Lock to lock the cache file, which inhibits the file_copy operation that causes the error. The resource detects its cache is locked after having loaded the cache, but before refreshing the cache.

The result of adding this lock is that if two processes are simultaneously reloading the resource, the winner will first load the cached version (call it C-1) and then load C0 after fetching it. The loser will load C-1, encounter the lock and stop. On the next iteration, Winner gets C1 and Loser gets C0.

So the result of the lockstep is that loser is at most out of date by one version of the resource. A better synchronisation would be if we had distributed locks so that Loser is notified when Winner releases its lock and then loads the fresh cache file.

File Changes

Modified 1 files
  • /branches/KDE/3.5/kdepim/kresources/remote/resourceremote.cpp
1 files changed in total