Trying to understand wait()
and notify()
. I know when thread A
went to wait()
it will be waked up by notify()
from other thread.
But what will happens if threads A
,B
,C
went to wait()
in represented order? Who will be waked up by notify()
? According to my experiments A
thread will be waked up at first. I'm right?
Does it means that system knows in which order threads went to wait()
?