[linux-audio-dev] GThread vs. pthread

Pete Bessman ninjadroid at gazuga.net
Sat Jun 12 04:49:37 UTC 2004


At Sat, 12 Jun 2004 00:10:17 -0400,
Paul Davis wrote:
> 
> >Does anybody have any opinion on which threading system is superior?
> >I've been using glib for a lot of things, but for whatever reason I'm
> >hesitant about using it for threading if the only benefit it will
> >provide is consistency (I'm guessing it's just a wrapper for pthread
> >anyway).
> 
> yes, its just a wrapper. there's nothing in the semantics of GThread
> that isn't present in pthreads; conversely, pthreads does have a few
> corners here and there that GThreads don't wrap because they don't
> exist in some of the other thread systems that GThreads
> supports. you're unlikely to need them. personally, i prefer to use
> pthreads because its a fully specified standard that is independent of
> any particular platform. otoh, there is a very similar argument for
> GThread.

One more point in favor of GThread I just figured out is config
testing for it.  All you have to do is at a pkg-config check for
gthread-2.0 and your set.  Having glanced through other programs,
checking for pthreads seems a bit more involved than I care to be
(read: not at all, I hate the fscking autotools).  So, I think
I'll roll with GThread.

Thank you much for chiming in on this.

[pb]




More information about the Linux-audio-dev mailing list