posted 14 years ago
It is impossible to say whether this is correct or not without looking at the full code, but assuming the code is as usual for threads(e.g. o is a Runnable and object1 is same as o, etc), you are right, the picture correctly depicts the concept.
Also, instead of writing synchronized(object1), it would even be okay if you declare the method as synchronized in this case. When run method of one thread finishes, notifyAll() method is automatically called and another random thread waiting for this monitor will be picked up for running.