diff options
author | Ivan Zhakov <ivan@apache.org> | 2019-05-27 07:05:26 +0000 |
---|---|---|
committer | Ivan Zhakov <ivan@apache.org> | 2019-05-27 07:05:26 +0000 |
commit | 89f3bedb3caf2297f176193fab9cd1f989f01d59 (patch) | |
tree | e3573a79bc4c1b73414614a97f676ae9f92345dd /file_io | |
parent | 1e5451be805a90f214b251645113c1f96a6543ad (diff) | |
download | apr-89f3bedb3caf2297f176193fab9cd1f989f01d59.tar.gz |
* file_io/win32/readwrite.c
(read_with_timeout): We do not handle WAIT_ABANDONED here because they
can be returned only when waiting for mutex [1], but not for events.
[1] https://docs.microsoft.com/en-us/windows/desktop/api/synchapi/nf-synchapi-waitforsingleobject#return-value
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860107 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r-- | file_io/win32/readwrite.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/file_io/win32/readwrite.c b/file_io/win32/readwrite.c index 9c06ded63..7e25b490d 100644 --- a/file_io/win32/readwrite.c +++ b/file_io/win32/readwrite.c @@ -81,15 +81,13 @@ static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t le rv = apr_get_os_error(); if (rv == APR_FROM_OS_ERROR(ERROR_IO_PENDING)) { /* Wait for the pending i/o, timeout converted from us to ms - * Note that we loop if someone gives up the event, since - * folks suggest that WAIT_ABANDONED isn't actually a result - * but an alert that ownership of the event has passed from - * one owner to a new proc/thread. + * Note that we loop if someone gives up the event. + * + * NOTE: We do not handle WAIT_ABANDONED here because they + * can be returned only when waiting for mutex. */ - do { - res = apr_wait_for_single_object(file->pOverlapped->hEvent, - file->timeout); - } while (res == WAIT_ABANDONED); + res = apr_wait_for_single_object(file->pOverlapped->hEvent, + file->timeout); /* There is one case that represents entirely * successful operations, otherwise we will cancel |