Re: Patch: prevent send queue to launch two sending threads



Approved, nice catch 

On Wed, 2008-11-19 at 16:45 +0100, Sergio Villar Senin wrote:
> Hi,
> 
> this is a fix that we developed for the stable branch of tinymail and
> that is worth merging to trunk. Basically the problem that we detected
> is that create_worker could create two different threads to process
> emails. The reason was that priv->is_running was not set until the
> thread started to run, so it could happen that there were two calls to
> create_worker that could start two different threads accessing the same
> data without any locking to protect things like priv->cancel
> CamelOperation for example.
> 
> BTW the attached patch includes also the patch I sent before in an email
> with subject "Patch: change in send queue behaviour when notifying the
> user" because it was not committed before, I completely forgot it :)
> 
> Basically the modifications for this issue are the ones related to
> priv->is_running and the new priv->running_lock


-- 
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]