httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <>
Subject Re: Buffered file I/O & thread safety
Date Sun, 11 Jun 2000 20:11:11 GMT
On Sun, Jun 11, 2000 at 11:07:28PM +1000, Brian Havard wrote:
> 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.

View raw message