- From: Sebastian Wilhelmi <seppi seppi de>
- To: John Cupitt <john cupitt ng-london org uk>
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: pthread_setconcurrency
- Date: Wed, 07 Jan 2004 13:55:46 +0100
> I'm moving something from pthreads to g_thread and I noticed there's
> no wrapping for pthread_setconcurrency(). Does anyone know the
> reasoning here? Should I ignore this?
GLib tries to handle threads from an abstract perspective to make them
more portable. pthread_setconcurrency generally only makes sense for
platforms with m-to-n thread (pthread_setconcurrency sets 'n'). And this
is a implementation detail. If a program really needs it (which of
course can happen, but it should be rare), it has to to directly use the
underlying thread platform. Note however, that most thread
implementations nowadays are 1-to-1, most notably Linux. There
pthread_setconcurrency does not make any sense at all.
In short: Ignore it and hope, it'll work, otherwise try to find out, why
it is used there (It might be used to make a 1-to-1 model on top of a
m-to-n model, though bound threads would have had the same effect in a
more clean way) and ask again.
Sebastian Wilhelmi | här ovanför alla molnen
mailto:seppi seppi de | är himmlen så förunderligt blå
] [Thread Prev