osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SDF] Why do we need markDone (or an equivalent claim)?


In looking at the SDF examples, it seems error-prone to have to
remember to write

    tryClaim([fake-end-position])

to indicate that a restriction is finished. IIRC, this was done to
decide whether the entire restriction had been processed on return in
the case that tryClaim never returned false. It seems preferable to
encode this into the return value (with a void return meaning iff
tryClaim returned false, and a non-void return being able to indicate
any hints as to when, if ever, process should be called again).

Can someone job my memory as to if there was a case in which this wouldn't work?