Re: Double lock issue, when trying to remove a file
- From: Philip Van Hoof <spam pvanhoof be>
- To: Sergio Villar Senin <svillar igalia com>
- Cc: tinymail-devel-list gnome org
- Subject: Re: Double lock issue, when trying to remove a file
- Date: Wed, 15 Nov 2006 13:35:36 +0100
On Wed, 2006-11-15 at 13:20 +0100, Sergio Villar Senin wrote:
> Hi,
>
> the remove strategy has a double lock issue when trying to delete a
> message. This is the sequence
>
> tny_camel_folder_remove_msg_default ()
> {
> [...]
> g_mutex_lock(priv->folder_lock);
> [...]
> tny_msg_remove_strategy_remove (...)
>
> and then inside this call we have a tny_camel_folder_get_folder that
> will call g_mutex_lock again.
>
> My suggestion will be to create a "protected" method in tny_camel_folder
> called for example tny_camel_folger_get_folder_no_lock that will perform
> the same operation but without locking.
>
Protected methods start with _ and are declared in a -priv.h file.
You can go ahead and patch it this way. Aka. I agree with your
solution :)
> Opinions?
>
> Br
>
> _______________________________________________
> tinymail-devel-list mailing list
> tinymail-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/tinymail-devel-list
--
Philip Van Hoof, software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
work: vanhoof at x-tend dot be
blog: http://pvanhoof.be/blog
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]