mirror of
https://gitee.com/jd-platform-opensource/asyncTool.git
synced 2024-12-31 15:35:34 +08:00
commit
96c6a8490f
@ -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
|
|
||||||
public Thread newThread(Runnable runnable) {
|
|
||||||
Thread thread = new Thread(runnable, "System Clock");
|
Thread thread = new Thread(runnable, "System Clock");
|
||||||
thread.setDaemon(true);
|
thread.setDaemon(true);
|
||||||
return thread;
|
return thread;
|
||||||
}
|
|
||||||
});
|
});
|
||||||
scheduler.scheduleAtFixedRate(() -> now.set(System.currentTimeMillis()), period, period, TimeUnit.MILLISECONDS);
|
scheduler.scheduleAtFixedRate(() -> now.set(System.currentTimeMillis()), period, period, TimeUnit.MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
@ -281,7 +281,6 @@ public class WorkerWrapper<T, V> {
|
|||||||
//上游都finish了,进行自己
|
//上游都finish了,进行自己
|
||||||
fire();
|
fire();
|
||||||
beginNext(poolExecutor, now, remainTime);
|
beginNext(poolExecutor, now, remainTime);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user