--On Sunday, February 10, 2002 9:16 AM -0800 Ian Holsman <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] http://www.lisanza.net/ Internet Management Consulting
