apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@apache.org>
Subject Re: [PATCH] Win32: Why explicitly futz with the file pointer?
Date Sun, 20 Oct 2002 14:45:41 GMT
At 07:08 AM 10/20/2002, Bill Stoddard wrote:
>Why do we need to call SetFilePointer to each call of apr_file_write()? In
>the common case where only threads in a single process write to a file,
>calling SetFilePointer is a waste of cycles. If threads from multiple
>processes are writing to a file, then we are broken unless the application
>explicitly serializes access to apr_file_write()

I'll take a wild guess...

Unix append mode -always- writes to the end of the file, even when it is
in use by multiple processes.  Win32 has no absolute, atomic append
mode for it's file open.

But you are correct, there is a race here that even the 'emulation' falls

View raw message