fix AsyncIO::doWait
Summary: As it turns out, `io_getevents` may actually return less than `min_nr` events. According to the aio logic (https://github.com/torvalds/linux/blob/10b5b5361a3c2a7fff9dbfa0f127adc2531e7732/fs/aio.c#L1634), there may be a couple of rounds required to get at least `nr_min` events, and if interrupted after the first one, incomplete results would be returned Test Plan: fbconfig -r folly/experimental/io/test && fbmake runtests_opt -32 and was no longer able to repro #4609062 Reviewed By: soren@fb.com FB internal diff: D1410389 Tasks: 4609062
Showing
Please register or sign in to comment