From 47e9c21909034ef2d68937ec970a1c8c3b380ada Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 26 Feb 2011 18:59:46 +0100 Subject: fix TestRecursiveLock01's LockedObjectAction1 sync --- .../com/jogamp/common/util/locks/TestRecursiveLock01.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src') 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; } } -- cgit v1.2.3