Race condition in Search.ozf
David Hopwood
david.nospam.hopwood at blueyonder.co.uk
Sun Feb 5 17:06:09 CET 2006
[resend to hackers@ instead of users@, sorry.]
David Hopwood wrote:
> Harmon Nine wrote:
>
>>Actually, we tried an approach like this as well. Unfortunately, there
>>is still a race, as there is a chance, however small, that the stop
>>method could be called in between the checking of the 'stopped' flag and
>>the call to the "next" (or other) method in the Search.object subclass.
>>This approach decreases the probability that the "stop" will succeed,
>>but it's still not 100%, and thus still probabilistic.
>>
>>Of course, the mods to make "stop" deterministic might break some
>>existing code. So it might be better to put it into a new class like
>>"SearchDet.oz". This is what we did for our project.
>
> Or, add methods 'stopUntilResumed' and 'resume' with the semantics
> Harmon asked for, leaving 'stop' with its current semantics.
--
David Hopwood <david.nospam.hopwood at blueyonder.co.uk>
More information about the mozart-hackers
mailing list