Re: Proposal: Enable threads by default
- From: Alexander Larsson <alexl redhat com>
- To: Dan Winship <danw gnome org>
- Cc: "gtk-devel-list gnome org" <gtk-devel-list gnome org>
- Subject: Re: Proposal: Enable threads by default
- Date: Tue, 01 Dec 2009 21:36:48 +0100
On Tue, 2009-12-01 at 09:26 -0500, Dan Winship wrote:
> On 12/01/2009 08:29 AM, Alexander Larsson wrote:
> > In addition to enabling threads (if complied in) in g_type_init() it
> > adds a G_THREADS_MANDATORY define that if set causes all the
> > g_thread_supported() calls to be removed in the g_thread_* macros.
>
> Should probably add that to Cflags in gobject-2.0.pc.in too?
I don't think that is quite right. Its only safe to set this define if
you can guarantee there is no calls to your code before g_type_init (or
g_thread_init directly) is called. This is true for gobject (must call
g_type_init first) and gio (100% gtype library). However, one could
imagine some library of e.g. utility functions that have stuff you can
use before g_type_init() is called.
> Also, do we want to get rid of the possibility of compiling glib
> without
> threads? Allowing threadless glib means we still need to have the
> non-threaded versions of GIOScheduler, GResolver, etc, lying around,
> but
> they'll never get used in normal builds.
I wouldn't mind this, but on the other hand its not really a large
maintainance burden, is it?
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alexander larsson gmail com
He's an obese devious vagrant fleeing from a secret government programme.
She's a chain-smoking mutant opera singer with her own daytime radio talk
show. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]