What is wrong with synchronized(this)?
Is there anything wrong with this?
synchronized(this)
I have try to do the following with a monitor object, but I get IllegalMonitoreStateException: current thread not owner
when using:
.
..
...
synchronized (MONITOR){
while (isSuspended && workerThread == thisWorker){
try{
wait();
}catch (InterruptedException x){
x =null;// ignored
}
}
.
..
...

