Commit 84ea3d14 authored by Tamar Christina's avatar Tamar Christina Committed by Ben Gamari

winio: Relaxing some constraints in io-manager.

parent 8da15a09
......@@ -676,6 +676,7 @@ withOverlappedEx mgr fname h offset startCB completionCB = do
when (not threaded) $
do num_remaining <- outstandingRequests
servicedIOEntries num_remaining
completeSynchronousRequest
return $ IOFailed Nothing
let runner = do debugIO $ (dbg ":: waiting ") ++ " | " ++ show lpol
res <- readIOPort signal `catch` cancel
......
......@@ -306,7 +306,7 @@ void awaitAsyncRequests (bool wait)
not empty but we can't do that here. Also these locks don't guarantee
fairness, as such a request may have completed without us seeing a
timeslice in between. */
if (wait && !outstanding_service_requests)
if (wait && outstanding_service_requests)
SleepConditionVariableSRW (&threadIOWait, &lock, INFINITE, 0);
ReleaseSRWLockExclusive (&lock);
}
......
......@@ -412,7 +412,7 @@ int FS(_stat64) (const char *path, struct __stat64 *buffer)
static __time64_t ftToPosix(FILETIME ft)
{
// takes the last modified date
/* takes the last modified date. */
LARGE_INTEGER date, adjust;
date.HighPart = ft.dwHighDateTime;
date.LowPart = ft.dwLowDateTime;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment