Re: The GDK lock in tinymail



On Fri, 2007-08-03 at 18:51 +0100, Rob Taylor wrote:
> Philip Van Hoof wrote:
> > This patch makes Tinymail's callbacks and observer's updates behave like
> > signals in Gtk+.
> > 
> > Please review extensively 

> That's quite a complex patch! Could you explain it a bit?

o. The notify_folder_observers, and notify_folder_store_observers got a
   _in_idle equivalent that will throw the function call into the
   GMainLoop using a g_idle_add_full. This was done to in a generic way
   escape the GDK lock or throw the call out of a thread

o. All locations where folder observers are now called, are in the
   GMainLoop or at locations where it makes sense to lock the GDK lock

o. All tny_folder_store_observer_update and tny_folder_observer_update
   have been wrapped with tny_lockable_lock and tny_lockable_unlock

o. All callbacks have been wrapped with tny_lockable_lock and
   tny_lockable_unlock

o. notify_folder_observers_about_copy got rewritten

o. inform_observers_about_transfer got renamed to
   notify_folder_observers_about_transfer

o. tny_camel_account_get_supported_secure_authentication got rewritten

o. tny_gtk_folder_store_tree_model_folder_obsr_update got rewritten (it
   assumed that it got called from a thread, which is not the case
   anymore)

o. tny_gtk_folder_store_tree_model_store_obsr_update got rewritten (it
   assumed that it got called from a thread, which is not the case
   anymore)

o. All status_callback invokes got wrapped by tny_lockable_lock and
   tny_lockable_unlock (in tny-progress-info.c)


-- 
Philip Van Hoof, software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://www.pvanhoof.be/blog







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