Re: GLibc



Hi,

> I have a question on GLib's Gthread pool...
> Why there is no option for specifying the stack size
> (for threads), while creating the thread pool?
> I think now it uses the default stack size for all the
> threads in the pool.

It's because that would it make impossible to reuse threads from one
threadpool for another. Additionally thread stack sizes are not very
portable and often not very useful. Older versions of g_thread_create
and g_thread_pool_new had a stack size argument, but we left it out in
the final versions because of that.

> But what should we do when we need to build threads
> with customized value for stack-size, while 
> creating the pool

Not much, I'm afraid. You could build your own poor-mans-thread-pool
with GAsyncQueue, if you don't need to pass threads from different
threadpools to each other. That should be fairly simple.

Ciao,
Sebastian
-- 
Sebastian Wilhelmi                 |            här ovanför alla molnen
mailto:seppi seppi de              |     är himmlen så förunderligt blå
http://seppi.de                    |




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