On Mon, 26 Aug 2013 18:58:21 +0400
Ivan Zhakov <i...@visualsvn.com> wrote:

> Alternative solution would be take file->lock mutex on write operation
> and user shared OVERLAPPED structure. Also note that MSDN states that
> opening file with FILE_APPEND permissions only will perform atomic
> move-to-end + write without overlapped I/O.

Sure, that works for files, but apr_file_write is not strictly for
true file-based handles, right?

Some general thoughts... until apr_file_writev is called, we won't
need the append file lock.  But... we need to mutex against the
parallel calls to apr_file_writev so we can't create the mutex to
interlock at that moment.

... we need completion contexts with an event-per-thread ... but
these do not span apr_ calls.  What about parking a per-thread
apr-shared completion context created on apr thread startup and
the event handle closed on apr thread teardown?

Reply via email to