Re: per-worker-thread counter question

2011-07-02 Thread Neil McKee
Trying to iterate over worker threads that may be starting and stopping seemed just too darn hard (for me anyway). Reading the "scoreboard" code put me off. I ended up using atomic operations. In the mod_sflow module this boils down to just 3 atomic operations in the critical path. That's t

Re: per-worker-thread counter question

2011-06-30 Thread Massimo Manghi
I found this problem conceptually interesting and worth of generalization in many contexts. I'd like to know if Neil got around the problem with something that could be a satisfying solution. thanks -- Massimo On 06/28/2011 04:57 AM, Neil McKee wrote: Hi, Here's an easy question for someo

Re: per-worker-thread counter question

2011-06-28 Thread Nick Kew
On 28 Jun 2011, at 03:57, Neil McKee wrote: > Hi, > > Here's an easy question for someone who knows their way around... Yeah, right :P > I want to maintain a new global counter, but for performance reasons I am > reluctant to use a mutex or atomic_increment to update it. I would rather >