!1 Feat:clean code fragement

Merge pull request !1 from 寒沧丶/clean
This commit is contained in:
tianyaleixiaowu 2020-06-12 22:49:00 +08:00 committed by Gitee
commit 96c6a8490f
2 changed files with 4 additions and 8 deletions

View File

@ -31,13 +31,10 @@ public class SystemClock {
} }
private void scheduleClockUpdating() { private void scheduleClockUpdating() {
ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor(new ThreadFactory() { ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor(runnable -> {
@Override Thread thread = new Thread(runnable, "System Clock");
public Thread newThread(Runnable runnable) { thread.setDaemon(true);
Thread thread = new Thread(runnable, "System Clock"); return thread;
thread.setDaemon(true);
return thread;
}
}); });
scheduler.scheduleAtFixedRate(() -> now.set(System.currentTimeMillis()), period, period, TimeUnit.MILLISECONDS); scheduler.scheduleAtFixedRate(() -> now.set(System.currentTimeMillis()), period, period, TimeUnit.MILLISECONDS);
} }

View File

@ -281,7 +281,6 @@ public class WorkerWrapper<T, V> {
//上游都finish了进行自己 //上游都finish了进行自己
fire(); fire();
beginNext(poolExecutor, now, remainTime); beginNext(poolExecutor, now, remainTime);
return;
} }
} }