|
Boost Users : |
From: John Reid (j.reid_at_[hidden])
Date: 2006-08-07 08:52:14
Ovanes Markarian wrote:
> What I miss now in the threading library is the ability to reuse the thread. I think thread
> creation in the OS is an expensive task. If one has created thread, there should be a possiblity
> to reuse it. I understand it is possible to pass a function to the thread which executes tasks
> from the queue and therefore reuses threads, but this involves user implementation of such a
> function each time this programming pattern needs to be fullfilled.
If I remember correctly thread creation in Solaris at least is cheap and
Sun's developer manuals explicitly recommend creating threads as needed
rather than pooling them.
I'm not sure about other OSes. It might be worth checking before
designing such a pool.
John.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net