diff options
author | Sven Gothel <[email protected]> | 2015-09-15 06:36:35 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-09-15 06:36:35 +0200 |
commit | 3e40d97a9a7a60e746b3703d2c7d3f4884159a52 (patch) | |
tree | b7682721b8486025d18adcea3e3dba79e510622b /src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java | |
parent | 1c4e2d3ea379fe6578dfb84e10f22729b71b1ae5 (diff) |
Bug 1213: Use InterruptSource.Thread
Diffstat (limited to 'src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java')
-rw-r--r-- | src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java b/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java index 4508f94..7455618 100644 --- a/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java +++ b/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java @@ -38,6 +38,7 @@ import org.junit.Assert; import org.junit.Test; import com.jogamp.common.os.Platform; +import com.jogamp.common.util.InterruptSource; import com.jogamp.junit.util.SingletonJunitCase; import org.junit.FixMethodOrder; @@ -170,7 +171,7 @@ public class TestRecursiveLock01 extends SingletonJunitCase { public final void action2Deferred(final int l, final YieldMode yieldMode) { final Action2 action2 = new Action2(l, yieldMode); - new Thread(action2, Thread.currentThread().getName()+"-deferred").start(); + new InterruptSource.Thread(null, action2, Thread.currentThread().getName()+"-deferred").start(); } public final void lock() { @@ -296,14 +297,14 @@ public class TestRecursiveLock01 extends SingletonJunitCase { final long t0 = System.currentTimeMillis(); final LockedObject lo = new LockedObject(implType, fair); final LockedObjectRunner[] runners = new LockedObjectRunner[threadNum]; - final Thread[] threads = new Thread[threadNum]; + final InterruptSource.Thread[] threads = new InterruptSource.Thread[threadNum]; int i; for(i=0; i<threadNum; i++) { runners[i] = new LockedObjectRunner1(lo, loops, iloops, yieldMode); // String name = Thread.currentThread().getName()+"-ActionThread-"+i+"_of_"+threadNum; final String name = "ActionThread-"+i+"_of_"+threadNum; - threads[i] = new Thread( runners[i], name ); + threads[i] = new InterruptSource.Thread( null, runners[i], name ); threads[i].start(); } |