[libbluray-devel] Fix waitForShutdown()

hpi1 git at videolan.org
Tue Mar 11 14:55:52 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Mar 11 15:44:50 2014 +0200| [84445723b246d0e73bcbfdd28210efde67fa1495] | committer: hpi1

Fix waitForShutdown()

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=84445723b246d0e73bcbfdd28210efde67fa1495
---

 src/libbluray/bdj/java/org/videolan/BDJThreadGroup.java |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/libbluray/bdj/java/org/videolan/BDJThreadGroup.java b/src/libbluray/bdj/java/org/videolan/BDJThreadGroup.java
index c644ad2..e814d29 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJThreadGroup.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJThreadGroup.java
@@ -35,7 +35,7 @@ public class BDJThreadGroup extends ThreadGroup {
         this.context = context;
     }
 
-    public boolean waitForShutdown(int maxThreads, int timeout) {
+    public boolean waitForShutdown(int timeout, int maxThreads) {
         long startTime = System.currentTimeMillis();
         long endTime = startTime + 1000;
         while ((activeCount() > maxThreads) &&
@@ -55,14 +55,14 @@ public class BDJThreadGroup extends ThreadGroup {
     protected void stopAll(int timeout) {
 
         interrupt();
-        waitForShutdown(0, timeout);
+        waitForShutdown(timeout, 0);
 
         if (activeCount() > 0) {
             logger.error("stopAll(): killing threads");
             dumpThreads();
 
             PortingHelper.stopThreadGroup(this);
-            waitForShutdown(0, 500);
+            waitForShutdown(500, 0);
         }
 
         try {



More information about the libbluray-devel mailing list