[gnome-db] Re: g_thread_init call.
- From: Vivien Malerba <vmalerba gmail com>
- To: bas driessen xobas com
- Cc: GNOME-DB List <gnome-db-list gnome org>
- Subject: [gnome-db] Re: g_thread_init call.
- Date: Tue, 12 Apr 2005 15:33:07 +0200
On Apr 12, 2005 3:18 PM, Bas Driessen <bas driessen xobas com> wrote:
> Hello Vivien,
>
> I noticed that you added the following line to libgda/gda-init.c
>
> g_thread_init (NULL);
>
> The application from where I link to the libgda libraries, already calls
> g_thread_init and now I get the error:
>
> GThread-ERROR **: GThread system may only be initialized once.
> aborting...
> Aborted
>
> I see that you put some flags around this call, so I can set the CFLAGS for
> instance to disable it, but I was wondering if it is not better to put this
> g_thread_init call somewhere else. If people are not using the thread
> features of libgda, the init function should also not be called in my
> opinion.
>
> Future libgda versions that will ship with the Linux distributions, will
> probably include this g_thread_init call, so that means that I always have
> to supply a modified version of libgda, while I would like to stick with the
> "defaults".
>
> Does this make sense?
>
> Bas.
>
>
You can modify your source to:
if (!g_thread_supported ()) g_thread_init (NULL);
instead of:
g_thread_init (NULL);
I'll modify the gda_init() function to add that test myself, but you
can do that modification localy in libgda for now.
If you can't, then I'll have to modify the gda_init() function to
introduce optional inclusion of threading support, but I'd prefer not
do this since I want to introduce non blocking (asynchronous)
functions in libgda.
Vivien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]