httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Buffered file I/O & thread safety
Date Mon, 12 Jun 2000 00:16:02 GMT

> > In the case of mod_include or config file reading only 1 thread will ever
> > touch the ap_file_t so a serious speed boost can be achieved by turning off
> > the locking. To this end I propose adding a flag value for ap_open() to
> > indicate if the handle needs to be thread safe, say APR_MT.
> Tons of flag checking can make the code harder to read IMO. What the
> Linux kernel does is to provide an unlocked version of a call, and
> then make the locked version wrap that.
> Then it also becomes extremely clear that you're doing something
> unsafe, as OtherBill requested.

No, this is a flag that will need to be set on the open call.  The open
basically does nothing but checking flags.  I dislike thoroughly having
multiple versions of the same functions just to not have mutex locking.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message