apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harrie Hazewinkel <har...@lisanza.net>
Subject Re: Atomic operations
Date Mon, 11 Feb 2002 13:27:03 GMT

--On Sunday, February 10, 2002 9:16 AM -0800 Ian Holsman <ianh@apache.org> 

> 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.


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

View raw message