java.util.TimerTask
Erik Poupaert
erik.poupaert@chello.be
Thu Jun 19 14:41:00 GMT 2003
> Do you have a synchronized(this) around this loop?
> Otherwise it might just be throwing MonitorStateExceptions inside the
> loop. Try using Thread.sleep() otherwise.
You're right.
Thread.sleep() works much better in this scenario. Even
though I wouldn't be able to tell why, I see that "we need to use a
mutex in order to prevent MonitorStateExceptions".
Nobody will believe I've said this, let alone, understand what I've just
said :)
More information about the Java
mailing list