Boost logo

Boost :

From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2006-10-24 03:12:43


Hi Chris,

On 10/24/06, Christopher Kohlhoff <chris_at_[hidden]> wrote:
>
> Dean Michael Berris wrote:
>
> > Although we use thread locking primitives even on the active
> > objects (which I thought were necessary without using
> > strands).
>
> One of my design goals is that library users shouldn't generally
> need to use any thread locking primitives at all. If you have a
> single thread calling io_service::run(), and always use
> io_service::post() to post work into the active object's thread,
> then no locking is required.
>

I understand, however the active object had to access a resource (a
file) by appending information to it. We have not yet refactored the
solution to use a strand for each function call to the write, and I
believe that's the better approach.

> Did you have explicit thread locking when you tried a single
> io_service with a pool of threads? That could certainly impact
> performance negatively.
>

Actually, we tried it on the multiple io_service solution, and the
results are pretty impressive. Though I think it should be better if
we just used a single io_service with a thread pool calling
io_service::run and used strands for each call to the critical
function calls.

Thanks, this is another TODO in our list to further improve the
performance of the system.

I will definitely let you know what happens with that approach over
the multiple io_service version.

-- 
Dean Michael C. Berris
C++ Software Architect
Orange and Bronze Software Labs, Ltd. Co.
web: http://software.orangeandbronze.com/
email: dean_at_[hidden]
mobile: +63 928 7291459
phone: +63 2 8943415
other: +1 408 4049532
blogs: http://mikhailberis.blogspot.com http://3w-agility.blogspot.com
http://cplusplus-soup.blogspot.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk