Subject: Re: [boost] [threadpool] parallel_sort example
From: Edouard A. (edouard_at_[hidden])
Date: 2009-03-02 13:54:31
> How many worker-threads should be created inside the default
As many threads as there are physical available sounds like a nice default
> Which scheduling strategy should by applied?
> The pool could use FIFO ordering of the queued tasks but the amount of
> worker-threads depend on the threadpool usage.
> THe pool could create as many worker-threads as CPUs are online an bind
> thread to one specific CPU/Core - CPU intensive apps could benefit form
Unless you know what you're doing it's best to let the OS decide on which
CPU the thread should be running. For a default pool I submit it is better
to let affinity alone. As noted above I agree with one thread / core.
Don't forget you're going to have threads outside your pool also requesting
the preciouuuus CPU resource.
Applications with lot of IO require usally more worker-
> threads than
You are correct but this doesn't sound like an use case for a "default"
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk