提交 c5ec6fee 编写于 作者: M Mathieu Bastian

Fix minor issue in LongTask API

上级 211d12c3
......@@ -41,10 +41,10 @@
*/
package org.gephi.utils.longtask.api;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
......@@ -328,11 +328,16 @@ public final class LongTaskExecutor {
if (task.future != null) {
task.future.cancel(interruptCancel);
}
cancelTimer.cancel();
cancelTimer = null;
if (task.progress != null) {
task.progress.finish();
}
finished(task);
if (!inBackground) {
Thread.currentThread().interrupt();
}
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册