1

Here is the full question:

Is the following property equivalent to saying that object x is wait-free?

For every infinite history H of x, every thread that takes an infinite number of steps in H completes an infinite number of method calls.

So I understand wait-free as no matter what,The thread which called the method will finish method execution in finite number of steps.From the example we know that every thread completes infinite number of methods.If it is not wait-free,then it should have been halted in some method(so it should take infinite number of steps to complete the method) and therefore It can't complete infinite number of methods(because it has halted somewhere in the method).So it is wait-free.

Is the above reasoning correct?I would appreciate more accurate/correct answer.

sparrow2
  • 147
  • 1
  • 11
  • This isn't really a java question. I think you'd have better luck at https://cs.stackexchange.com -- SO is more for practical programming questions (and so doesn't generally worry about things like threads completing an infinite number of steps. :) ) – yshavit Oct 13 '17 at 19:51
  • @yshavit Thanks for the advice.I will post there too,but if anyone can help here I would appreciate. :)) – sparrow2 Oct 13 '17 at 19:53
  • 1
    They seem equivalent to me, for precisely the reason you stated. – David Schwartz Oct 13 '17 at 19:54
  • I dunno, infinity is a weird thing. :) Your proof seems reminiscent of Hilbert's Hotel, but I don't know if it really is, or if that has any bearing. – yshavit Oct 13 '17 at 20:31

0 Answers0