Re: [evolution-patches] Re: patch for bug 312857



You have totally got to be kidding me.  This code can't possible work
reliably, it has a blatantly obvious race just setting up the mutex.  A
static mutex MUST be pre-initialised or initialised using some other
atomic means.

+       if (!mutex)
+               mutex = g_mutex_new ();
 
+       if (!g_mutex_try_lock (mutex))
+               return;


And not only that, what is the use of a try lock, you have to actually
lock it, thats what its for.

Besides, don't use a global lock, have one on the folder, like every
other backend does.

On Sat, 2005-09-03 at 20:13 +0530, Harish Krishnaswamy wrote:
> On Fri, 2005-09-02 at 20:31 +0200, Vincent Untz wrote:
> > Le vendredi 02 septembre 2005 à 07:57 -0600, Jain Vivek a écrit :
> > > Hi,
> > > The summary for the groupwise provider is messed up since 2 threads are
> > > modifying at the same time. The patch makes sure that we try and lock
> > > before we modify the summary.
> > > Also we make sure that the item exists in the summary before actually
> > > trying to delete it.
> > 
> > Has this patch been approved by the maintainer?
> > 
> Yes. I have reviewed and approve this subject to 2/2 from the
> release-team.
> 
> Thanks,
> Harish
> 
> _______________________________________________
> Evolution-patches mailing list
> Evolution-patches gnome org
> http://mail.gnome.org/mailman/listinfo/evolution-patches
-- 
adfa(evolution-2.4:20087): gtkhtml-WARNING **: cannot find icon:
'stock_insert-url' in gnome 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]