Tag: multithreading
-
A quick guide to a producer-consumer using wait, notify, notifyAll in Java
Let me start by saying that you should never end up directly using wait, notify, or notifyAll(unless you have a good reason). Use a concurrency library if you need to do multithreaded things. Building a producer/consumer using wait/notify/notifyAll is one of those interview questions that you may get when talking about multithreading in Java. Given…