Re: gthread vs pthread
- From: Chris Vine <chris cvine freeserve co uk>
- To: Tristan Van Berkom <tvb gnome org>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gthread vs pthread
- Date: Tue, 17 Jul 2007 20:54:46 +0100
On Tue, 2007-07-17 at 09:53 -0400, Tristan Van Berkom wrote:
On Tue, 2007-07-17 at 21:20 +0800, Gregory Hosler wrote:
I've got a gtk+ application that needs a few threads put in it, to open up some
My question is whether I should go pthreads, or gthreads.
I've played a bit with pthreads, so I have some familiarity with it. I'm wondering:
- whether pthreads and gthreads can co-exist in the same application
- is there any benefit of one vs the other ? (no flames, just
looking for information here...)
- are there any known issues with pthreads in a gtk+ application?
thoughts, comments, pointers on the above appreciated.
Just use GThread, it uses pthread internally and is used throughout the
gtk+ code itself, the worst mistake you could make here I suppose
is to just go pthreading away and expect gtk+ to know whats going on.
If you know that the gthread implementation is a pthreads one (ie the
program is not running on Windows) there is absolutely no problem at all
in using pthreads in the program directly, and there are some things you
can do in pthreads and not in gthreads which mean that you might want to
] [Thread Prev