Boost logo

Threads-Devel :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2007-02-05 17:06:26


Kai Brüning wrote:
> My main concern is not the relative performance of heap allocation
> versus mutex/cond var but the delay of the thread which creates
> the new thread imposed by waiting until the new thread is up and running.

Your concerns apply when speaking about short lived threads, where
start-up time matters. In such a case I would use a pool of worker
threads that consume jobs from a work-item queue, so start-up is
a one time issue only.

Just my 2 cents,
Roland


Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk