posted 17 years ago
Hi Jothi,
it means that thread A is in a synchronized block, that has been synchronized on object b.
It enters the waiting room of object b and waits there
a) until some other thread notifies one or all waiting threads in the waiting room of object b and so our thread.
or
b) 2000 milliseconds are over.
Here's an example code. It's a bit long, but shows the two possibilities.
In the part above the sleep in the main method a thread doesn't get notified, and in the part below a thread waits, but becomes notified and ends earlier.
The sleep in the main method only seperates the two versions. I don't provide the output. Try it to see the timing.
Yours,
Bu.
all events occur in real time