Sign in
Log inSign up

How Multi-Threading Works

Default profile photo
Anonymous
·Dec 17, 2017

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?

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct