[logback-dev] svn commit: r2270 - logback/trunk/logback-core/src/test/java/ch/qos/logback/core/issue

noreply.ceki at qos.ch noreply.ceki at qos.ch
Fri Jun 5 15:12:39 CEST 2009


Author: ceki
Date: Fri Jun  5 15:12:39 2009
New Revision: 2270

Modified:
   logback/trunk/logback-core/src/test/java/ch/qos/logback/core/issue/LockingInJava.java

Log:
interrupting backwards the number are even more biased:

runnable[0]: counter=1002
runnable[1]: counter=0
runnable[2]: counter=0
runnable[3]: counter=0
runnable[4]: counter=0 

Modified: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/issue/LockingInJava.java
==============================================================================
--- logback/trunk/logback-core/src/test/java/ch/qos/logback/core/issue/LockingInJava.java	(original)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/issue/LockingInJava.java	Fri Jun  5 15:12:39 2009
@@ -45,13 +45,10 @@
     }
     // let the threads run for a while
     Thread.sleep(10000);
+    
     for (int i = THREAD_COUNT - 1; i <= 0; i--) {
       THREAD_ARRAY[i].interrupt();
     }
-
-    for (Thread t : THREAD_ARRAY) {
-      t.interrupt();
-    }
     Thread.sleep(100); // wait a moment for termination, to lazy for join ;)
   }
 


More information about the logback-dev mailing list