-
使用
Future<?> future = ExecutorSupplier.getInstance() .getBackgroundTasksExecutor() .submit(new Runnable() { @Override public void run() { } });
-
取消线程
future.cancle(true);
-
使用
Future<?> future = ExecutorSupplier.getInstance() .getBackgroundTasksExecutor() .submit(new PriorityRunnable(Priority.HIGH) { @Override public void run() { } });
-
等级设置
等级设置有四种
- Priority.LOW:低
- Priority.MEDIUM:中
- Priority.HIGH:高
- Priority.IMMEDIATE:最高
-
取消线程
future.cancle(true);