Re: Double lock issue, when trying to remove a file

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

The lock in tny_camel_folder_get_folder is not really needed I think. So
we can solve this one by removing it there (did that).

I would like to keep the get_folder a public one, so that other
implementers of remove-strategies can also use that one.

Maybe a recursive lock? But as far as I can see, the lock in get_folder
is a bit overkill anyway.

> 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.
> Opinions?
> Br
> _______________________________________________
> tinymail-devel-list mailing list
> tinymail-devel-list gnome org
Philip Van Hoof, software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
work: vanhoof at x-tend dot be

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