I am a bit confused about synchronized
-blocks in Java.
If one thread enters a synchronized
-block of an instance of a class, can other threads use synchronized
-methods of the same instance of the same class?
void myMain() {
synchronized(this) {
while(suspendFlag)
wait();
}
}
}
synchronized void mysuspend() {
suspendFlag = true;
}