mirror of
https://github.com/konsoletyper/teavm.git
synced 2025-01-06 10:15:18 +08:00
Fixed monitorExit to work with more than one enter/exit.
This commit is contained in:
parent
2fbc50e76f
commit
e2b6b7b2df
@ -51,10 +51,13 @@ public class TObject {
|
||||
}
|
||||
|
||||
static void monitorExit(TObject o){
|
||||
o.owner = null;
|
||||
|
||||
o.monitorCount--;
|
||||
if ( o.monitorLock != null ){
|
||||
o.monitorLock.notifyAll();
|
||||
if ( o.monitorCount == 0 ){
|
||||
if ( o.monitorLock != null ){
|
||||
o.owner = null;
|
||||
o.monitorLock.notifyAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user