Boost logo

Boost :

Subject: Re: [boost] [threadpool] draft n2276 - launch_in_pool
From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2008-11-21 09:00:28


Hi Oliver,

I'm not the author of the draft (nor am I part of the standards
committe) but I think I have some answers to your questions below.

On Fri, Nov 21, 2008 at 9:55 PM, Oliver Kowalke <k-oli_at_[hidden]> wrote:
> Hello,
> I did a look into draft n2276 - a launch_in_pool function is suggested (passing task to a system provided threadpool).
> Is it reasonable to have a static threadpool?

I think with the changes on the standards regarding function-local
static variables, I think it's alright.

> How many worker-threads should this pool contain and how are the submitted tasks queued (FIFO, priority order ... unlimited/limited number of tasks can bes stored).

I would think it should be customizable either as a compilation flag
(compile-time macros) or through overloads to the function.

> What about applications which require a pool with different configuration than the static pool provides?

It should be feasible to define through compile-time macros or even
with function overloads.

> Is it acceptable to pay for an unused pool?

You shouldn't have to -- especially if you don't call the function.
I'm thinking the function should be using a local static pool anyway,
which gets initialized (if called) before the thread for main() is
started.

HTH

-- 
Dean Michael C. Berris
Software Engineer, Friendster, Inc.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk