|
Boost Users : |
From: Andrew Agno (andrewagno_at_[hidden])
Date: 2007-06-22 11:56:47
On Thu, Jun 21, 2007 at 07:09:08PM -0700, Andrej van der Zee wrote:
> Does this happen by the shared io_service? Are the registered callback
> methods for async_read, async_accept, etc executed in the threads?
Yes and yes.
> Also, are there any tradeoffs that I should know off for using the
> single io_service vs io_service-per-thread approach?
An io_service per thread instead of one io_service able to use all the
threads sounds similar to the one-thread-per-connection approach, with
some extra indirection if you plan to use async functions. It would
have all the drawbacks of that approach. On the other hand, programming
to that model is going to be familiar to most people.
Andrew.
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