clean:clean code fragment

This commit is contained in:
sjsdfg 2020-06-12 22:28:49 +08:00
parent 0b2ab3347a
commit d52d730162
2 changed files with 4 additions and 8 deletions

View File

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

View File

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