At various times in our docs we indicate that the framework always calls
next after hasNext, and indicate that it doesn't matter in which the
processing is done, e.g. in the tutorial:

    Note that if it is more convenient you can request an empty CAS during
the process or
    hasNext methods, not just during the next method.
    .......
    Instead, you should spread your processing out across the calls to the
hasNext or next methods.

>
> I see no contract that says hasNext may be called more than once before
next, only implicit examples of next always being called after hasNext
returns true.  So we're not violating anything with the current
implementation but with one small change we can make things much easier for
CAS Multiplier writers and reduce their errors.  I have had to work around
this in the past but managed to forget it last week and wasted time
rediscovering the problem.

Burn.

Reply via email to