Log executor pending tasks

pull/178/head
M66B 5 years ago
parent 363e206a24
commit 8eb38aefef

@ -215,7 +215,7 @@ public class Helper {
}
private static class ThreadPoolExecutorEx extends ThreadPoolExecutor {
String name;
private String name;
public ThreadPoolExecutorEx(
String name,
@ -231,6 +231,11 @@ public class Helper {
protected void beforeExecute(Thread t, Runnable r) {
Log.d("Executing " + t.getName());
}
@Override
protected void afterExecute(Runnable r, Throwable t) {
Log.d("Executed " + name + " pending=" + getQueue().size());
}
}
private static class PriorityFuture<T> implements RunnableFuture<T> {

Loading…
Cancel
Save