Hi,
I don't know whether this is the right forum to ask this question or. Apology in advance if the question is lightweight one :-).
Q.
Assumption1. There is a class A, having two methods namely m1 & m2. Both m1 and m2 have the wait(); and notify(); coded.
Assumption2. There are two
thread T1 and T2. T1 access the m1 method of A, where as T2 will access the m2 method.
Now at the time of execution T1 encounters wait(); of m1 [Note that
notify();].
At this point of time what will happen to T2? Can T2 access m2 at this particular phase?[note T2 is yet to encounter wait(); , or is it required for T2 to wait until T1 encounters the notify(); ?