|
Boost : |
From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2007-05-07 01:34:41
On Mon, 07 May 2007 07:18:33 +0300, "Yuval Ronen"
<ronen_yuval_at_[hidden]> said:
> Atry wrote:
> > We already have thread pool and dispatcher in Boost.Asio, although it is
> > a very simple one.
>
> Oh, I didn't know that. Thanks for the pointer! Do they provide the same
> functionality (in general, not up to the last feature)? I will take a
> look at them. IMO, if they are like mine, they should reside in
> Boost.Thread rather than in Asio.
Asio doesn't include any functionality to spawn threads (in a pool or
otherwise). However, the io_service class can be used to dispatch work
items in a thread pool using a combination of io_service::post() and
io_service::run(). It's the same mechanism that is used to dispatch
completion handlers for asynchronous operations.
Cheers,
Chris
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk