"Ivanoff, Alex" <[EMAIL PROTECTED]> wrote: > What I call "infinite loop" you call "starvation". So > theoretically "arbitrarily many loops before setting > succeeds" might become "infinite number of loops before > setting succeeds".
No, only if the number or nature of tasks are infinite can it loop infinitely. One access is going to win for each loop, and that winner will make forward progress in its task. Unless forward progress doesn't reach completion, or the rate of incoming tasks exceeds the task completion rate, then the system will eventually process all tasks. And if the rate of incoming tasks exceeds the processing rate, then I think throttling would be a better solution. > So why not modify algorithm to try N time to succeed > and then throw an exception? Or something else? I think anything that relied on a feature like this has bigger issues. In other words, it would be a bad solution to the wrong problem. -- Barry -- http://barrkel.blogspot.com/ =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com