Re: Patch: rework IMAP IDLE locks behavior



On first sight this patch looks good.

Except that you have mixed in another patch related to bodystructure
fetching. 

On IRC we agreed that we'll both test this until Monday.

If neither of the two of us have spotted problems, and if no other
people object to it, you have approval to commit this on Monday.

It's indeed a complex changeset and if there are mistakes that I missed
during the review, it could introduce hard to find race problems.

Therefore I kindly advise all the teams working on E-mail clients based
on Tinymail to try this patch out on their own platform.


On Wed, 2008-10-29 at 17:20 +0100, José Dapena Paz wrote:
> 	Hi,
> 
> 	I'm attaching a complete rework of the lock behavior of Tinymail
> (camel) imap IDLE implementation.
> 
> 	The problem we want to fix is:
> 	* Sometimes IDLE thread causes deathlocks (connect lock, idle lock,
> g_thread_join, etc). This happens easily when there are disconnects, or
> when we switch fast among folders.
> 
> 	The main ideas with this implementation:
> 	* Provided a count of reasons to stop idle because of connect lock.
> 	* If a caller has taken connect lock, then it should do the send done
> stuff itself.
> 	* Idle thread has the connect lock always when it's in the body of the
> loop.
> 	* In any point, if we want to  take the connect lock, then we should
> stop idle. No partial idle can be alive when we want to connect.
> 	* Camel queue enables/disables the possibility to start idle. That's
> for avoiding running IDLE / SEND DONE in the middle of queued
> operations.
> 
> 	With these changes, the behavior is good, and I didn't get any new
> hang. I tested this both from Modest and Tinymail Demo UI, for 4 days,
> and still didn't get hangs.
> 
> 	Anyway, as the patch is really complex and long, I would ask for
> careful review). It's one of the most annoying bugs we have in Tinymail
> and it may be a solution for this :).
> 
> Changelog... the description of the patch in this mail would be a good
> explanation ;). I could also add a deep explanation of the way this is
> working in docs directory, for developers reference.
> 
> _______________________________________________
> tinymail-devel-list mailing list
> tinymail-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/tinymail-devel-list
-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be



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