apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: Why does apr_file_read() with !APR_XTHREAD use mutexes on Windows
Date Mon, 26 Apr 2010 21:13:31 GMT
On Mon, Apr 26, 2010 at 4:38 PM, William A. Rowe Jr.
<wrowe@rowe-clan.net> wrote:
> On 4/26/2010 2:19 PM, Jeff Trawick wrote:
>> So I don't think there's any hidden "reason" why a mutex should always
>> be obtained on Windows.  I too wouldn't be surprised if the fix breaks
>> some app code somewhere.
> Keep in mind fd-based operations are atomic on Unix, but not so on windows.

Since these are buffered files, it doesn't even come down to
differences in OS file operations; operations on the buffer would be
the expected failure point.

So the question is whether or not APR expects multi-threaded apps
sharing a buffered file to turn on the XTHREAD flag.

Make sense?

View raw message