[linux-audio-dev] GThread vs. pthread

Paul Davis paul at linuxaudiosystems.com
Sat Jun 12 04:10:17 UTC 2004


>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.

--p



More information about the Linux-audio-dev mailing list