Re: Is g_log threadsafe?
- From: Szymon Polom <polom convergence de>
- To: Tim Janik <timj gtk org>
- Cc: Szymon Polom <polom convergence de>, gtk-devel-list gtk org
- Subject: Re: Is g_log threadsafe?
- Date: Thu, 28 Jun 2001 17:30:52 +0200
Hi...
Quoting Tim Janik (timj gtk org):
> On Mon, 25 Jun 2001, Szymon Polom wrote:
> > i like the GLIB logging facility :).
> >
> > While being in a multithreaded application environment I get something like:
> >
> > conDVD(pid:25505conDVD (pid:25507): LIBCIMDECODERSPU-DEBUG (recursed):
> > write_spu start.
> > aborting...
> >
> > I assume that g_log is not threadsafe.
>
> g_log itself is thread safe (or at least supposed to be so, modulo bugs ;)
> but if you attach your own handler you have to make sure it locks all
> strucutres properly that might be used concurrently (even for the same
> handler being run at the same time from different threads).
>
> the "(recursed)" part above indicates that g_log() was called from within
> a handler of g_log() within the same thread. usually that shouldn't happen
> so we're aborting here.
Just to let you know. The problems are solved now.
Had to add a g_thread_init(NULL); call ;-).
Bye... SP.
--
Szymon Polom | GPG Key-ID 1024D/E6EA36F2
convergence integrated media GmbH | http://www.convergence.de
Rosenthaler Str. 51 | fon: +49(0)30-72 62 06 68
D-10178 Berlin | fax: +49(0)30-72 62 06 55
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]