On 21/08/2017 2:07 PM, Martin Buchholz wrote:
On Sun, Aug 20, 2017 at 6:36 PM, David Holmes <david.hol...@oracle.com
<mailto:david.hol...@oracle.com>> wrote:
On 20/08/2017 6:37 AM, Martin Buchholz wrote:
Future projects:
377 * <li>The specified amount of real time has elapsed, more or
less.
Replace with
* <li>At least the specified amount of real time has elapsed.
(I think I failed to persuade David last time ...)
And you will continue to do so. :) In the presence of spurious
wakeups it is completely untestable to say "at least the specified
time has elapsed"
My view is that spurious wakeup is a separate item in this list. "The
specified amount of real time has elapsed" should only be about "normal"
timeout.
And if you could perform whitebox testing that peeks inside to be able
to make the distinction that would be fine. But in terms of the API and
any conformance test, it is impossible to distinguish between an "early
return" and a "spurious return". So specifying "at least ..." is
meaningless so long as spurious wakeups are allowed.
Cheers,
David
377 * <li>The specified amount of real time has elapsed, more or less.
...
382 * <li>Thread <var>T</var> is awakened spuriously. (See below.)
I feel that "returning early" should occur only for rare spurious
wakeups (and I'd like even those to go away someday).