GNOME Bugzilla – Bug 727137
Make e-categories.h API thread safe
Last modified: 2014-03-28 09:19:07 UTC
This is a follow-up for bug #660535, with a request to make the e-categories.h API thread safe.
Created attachment 273125 [details] [review] libedataserver: Make ECategories thread safe Previously it was not, and could potentially be used from multiple threads simultaneously (e.g. the main UI thread, plus a contacts backend thread). Introduce a static global lock on the categories variables, which prevents most race conditions. Two functions are inherently unsafe, due to returning pointers to internal data structures. These functions have been deprecated and replacements introduced.
Review of attachment 273125 [details] [review]: Untested, but looks good. Just little nit-picks: a) Use stable version reference, aka instead of 3.13.1 use 3.14.0 in the patch b) (see below) Please change that and commit to master. Thanks. ::: libedataserver/e-categories.c @@ +567,3 @@ + * + * Returns: (transfer full) (element-type utf8): a sorted #GList containing + * the names of the categories.The list should be freed using g_list_free(), and Missing space before 'The'.
Thanks for the fast review. Pushed with those changes. I'll file a new bug to port Evolution to use the new APIs. Attachment 273125 [details] pushed as fe2f8f2 - libedataserver: Make ECategories thread safe
(In reply to comment #3) > I'll file a new bug to port Evolution to use the new APIs. Bug #727221 filed with a patch.