to run the same synchronization method is what current thread
sleep execution method and called. the other thread will not be
executed becoz locking the object is current thread that is in a State of sleep
then those who have completed execution of current thread synchronized method
the lock is released and then only another thread will have a chance to run
The synchronized method.
If another thread target executes is different, then the other thread will get
ability to run
No comments:
Post a Comment