apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Holsman <i...@apache.org>
Subject Re: Atomic operations
Date Mon, 11 Feb 2002 16:41:59 GMT
Harrie Hazewinkel wrote:
> --On Sunday, February 10, 2002 9:16 AM -0800 Ian Holsman <ianh@apache.org> 
> wrote:
> 
> 
>>hi.
>>I would really like to get atomic operations into the APR.
>>
>>having atomic_add would allow nifty things like virtual-host stats,
>>and reference counting (among others)
>>
> 
> Having done a lot of counting while making SNMP modules, I never needed
> some king of locking. OK, I admit it is maybe a bit of overhead, but you
> could create a pipe/channel that logs all required information to some
> extra thread/process that collects this all for you. Then by having
> that thread/process doing counting you can do either lock it local
> (local as in the process/thread) or just serialize all counting messages
> coming from the pipe.
> 

The reason I'm doing it is more for reference counting. I need to know 
when a object has no more requests against it, so I can kill it.

> 
> 
> Harrie
> 
> mailto: harrie@lisanza.net               http://www.lisanza.net/
> Internet Management Consulting
> 
> 




Mime
View raw message