summaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common/util/locks
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-02-26 18:59:46 +0100
committerSven Gothel <[email protected]>2011-02-26 18:59:46 +0100
commit47e9c21909034ef2d68937ec970a1c8c3b380ada (patch)
tree04f9a7fd8247dde874b455eb9124c76ed8626e8c /src/junit/com/jogamp/common/util/locks
parent837e90f090cf1627ad2897ecc1e9be428e0e3d43 (diff)
fix TestRecursiveLock01's LockedObjectAction1 sync
Diffstat (limited to 'src/junit/com/jogamp/common/util/locks')
-rw-r--r--src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java b/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java
index c847f5b..c1cbb88 100644
--- a/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java
+++ b/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java
@@ -145,8 +145,8 @@ public class TestRecursiveLock01 {
}
class LockedObjectAction1 implements LockedObjectIf {
- boolean shouldStop;
- boolean stopped;
+ volatile boolean shouldStop;
+ volatile boolean stopped;
LockedObject lo;
volatile int loops;
int iloops;
@@ -161,11 +161,11 @@ public class TestRecursiveLock01 {
this.yieldMode = yieldMode;
}
- public final synchronized void stop() {
+ public final void stop() {
shouldStop = true;
}
- public final synchronized boolean isStopped() {
+ public final boolean isStopped() {
return stopped;
}
@@ -179,10 +179,7 @@ public class TestRecursiveLock01 {
lo.action2Deferred(iloops, yieldMode);
loops--;
}
- synchronized(this) {
- stopped = true;
- notifyAll();
- }
+ stopped = true;
}
}