At 12:46 PM 10/20/2002, Aaron Bannert wrote: >On Sun, Oct 20, 2002 at 11:30:35AM -0400, Jeff Trawick wrote: >> Maybe APR_APPEND needs to be cheap/simple append a la stdio append: we >> seek to the end of the file at open time and forget about it after >> that. >> >> Then we need new APR_WRITE_AT_END or something better named which is >> the expensive atomic append. For Unix, this enables O_APPEND on the >> file and the kernel handles the details. For Win32, this enables >> acquire-global-mutex + setfileptr + release-global-mutex prior to >> every write. But then that has issues with non-related processes >> sharing the mutex. > >I like the idea, but yeah, to have a global mutex on windows you have >to give it a filename (so the non-related processes can rendezvous on >the same mutex).
Doesn't it make more sense to use a file lock instead of a mutex? [They should be effectively the same construct, performance wise.] Bill
