Re: threading by default [was Re: GIO will link with -pthread soon]

On Fri, 2009-11-20 at 14:09 -0500, Dan Winship wrote:
> On 11/20/2009 01:49 PM, Alexander Larsson wrote:
> > What about making g_slice able to handle late initialization of threads,
> > but everything else that uses g_thread apis to protect something would
> > just get threads auto-initialized. Then super-simple apps using just
> > glist and ghashtable would not get threads initialized, but things like
> > mainloops and whatnot would always get it.
> or for a simpler-to-describe alternative, how about making g_type_init()
> call g_thread_init(NULL). Then everything gobject-and-above will always
> have threading enabled, but libglib would stay the way it is now, where
> everything has to support being able to switch from unthreaded to
> threaded at any time.

I like this. Its also easier dependency-wise, as we don't need to make link in (which is kinda weird and possibly
problematic due to the circular deps), just

This would mean that for Gnome 3.0 we'd guarantee that threads are
always initialized. Of course, it also means we really have to land the
gobject performance fixes for threaded stuff, but we want to do that

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