Re: apr locks
From: Greg Stein <gstein_at_lyra.org>
Date: 2000-12-13 22:48:12 CET
On Wed, Dec 13, 2000 at 12:13:47PM -0600, Ben Collins-Sussman wrote:
Absolutely. Apache would fall over mighty fast if they didn't :-)
> I have a global hash the contains all loaded RA-libraries. I want the
Threads can share. Processes can't.
> However, I want to keep things threadsafe. When a thread
Create a global mutex (as a sibling of your hash). Initialize the mutex once
The lock type (mutex vs readwrite) is apparently ignored. Forget that
[ yes, it looks like I'll be going in there and revamping that API :-) ]
When anybody wants to read *or* write the hash, you must surround the access
Cheers,
(*) Actually, only Unix allows a NULL parameter; all other platforms expect
-- Greg Stein, http://www.lyra.org/Received on Sat Oct 21 14:36:17 2006 |
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.