Originally Posted by padhu1989
You must know that when threads are involved, there is very little that is "guaranteed".
There's absolutely no
guarantee that the run() of thread1 really starts before the run() of thread2 (and run() of thread2 before that of thread3).
And even if "casually" the order would be this, the thread scheduler is completely free to suspend the thread at any given moment and give the CPU to another thread.
Thus, basing on this explanation, are you still sure that the print of:
(by Caller ob1)
(by Caller ob2)
(by Caller ob3)
will always happen in this exact order?