Boost logo

Boost Users :

Subject: [Boost-users] non incremental use of atomic_counter
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2010-11-18 17:02:34


Hi,

I've got a following problem:

I need to maintain actively used shared counter in MT environment. I need usual
increment and decrement operations with increment value of 1 plus I also need
sometimes to operate with large increment value (like 1000, 10000).

I'd like to make handling of this counter as fast as possible and would like to
use atomic_counter used inside of boost::shared_ptr, but I can't seem be able to
find a way to effectively/correctly implement "massive" increments with it.

Any recommendations,

Thank you.

Gennadiy


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