> Its exactly that. You have to have a lock on the monitor to call wait. > When you start waiting you don't lock in anymore so others can take the lock > and also see that they also have to wait and start waiting. > > Then the first thread that calls notifyAll() on the monitor lock (where the > other 2 wait on) > will wake them all up. But the first one that comes out of the wait takes > the lock again > so the second one first have to wait what the first one that did come out > releases the lock again > (by going out of the sync block or again in the wait) > > The InterruptedException is completely different thing. That is i guess the > same kind of thing > then object.notifyAll but on a thread that then goes with an exception. But > as i said i haven't seen > that happening yet. And i currently don't know of a usecase.
Got it. I don't know why I was thinking that notifyAll would result in the exception. Sorry. I understand the code now, and unfortunately, I can't really think of a nicer way to do this either. Also, no explanation for the bug that Iman encounters :( Eelco ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user