Re: gthread: how many cores do I have?



On Mon, 2010-03-15 at 21:14 +0000, jcupitt gmail com wrote:
> Yes, libdispatch is a nice mechanism. If anyone's not come across it,
> it provides dynamically resizeable threadpools with a central manager
> which adjusts pools globally to keep the system from bogging down (and
> a few other bells and whistles, or that's my understanding anyway).
> 
> But it seems to me that we have a more immediate need: gthread has a
> threadpools, but no way to pick a reasonable size for a pool.
> 
> I guess existing cross-platform applications and libraries which use
> threadpools must all have some duplicated code to pick a default pool
> size*. If we centralise this, we could perhaps add some standard
> mechanisms, like a --g-threadpool-size=N argument, or a
> G_THREADPOOL_SIZE environment variable. 

Not sure if you've seen this, but Christian Hergert has an interesting
library called iris that includes thread and task scheduling.

http://git.dronelabs.com/iris

/ Cody



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]