Would anyone object to a simple, basic thread question? My question is not motivated by a practical problem. I am only reading about threads.
In Java Thread Programming, Paul Hyde says �When a lock is released, all the threads waiting for it compete for exclusive access. Only one will be successful, and the other threads will go back into a blocked state waiting for the lock to be released again.�
I am wondering about the words �go back�. When a lock is released, do all threads blocked on the lock become runnable? Then one thread is scheduled to run and acquires the lock. Then another thread is scheduled to run, but the lock is taken, so it becomes blocked again.
In Java Thread Programming, Paul Hyde says �When a lock is released, all the threads waiting for it compete for exclusive access. Only one will be successful, and the other threads will go back into a blocked state waiting for the lock to be released again.�
I am wondering about the words �go back�. When a lock is released, do all threads blocked on the lock become runnable? Then one thread is scheduled to run and acquires the lock. Then another thread is scheduled to run, but the lock is taken, so it becomes blocked again.