How Multi-Threading Works
Anonymous
I am new to Java and learning threads. Recently I came across synchronized keyword and its use. How ever i can not find answers to my one doubt-
- If there are lets say 10 threads and i am using synchronized as well as wait() and notify() to run one thread at a time. How can I call a particular thread at a time after first thread uses notify()?
Like if there is a thread X which notify() all the other threads. Now how can I specifically ask Y thread to use that lock in place of Z thread?