Comments (8)
from vproxy.
接口有点奇怪啊。不应该是类似于这种吗
interface Timer {
void runDelayed(Runnable r, long step, TimeUnit tu);
}
from vproxy.
接口有点奇怪啊。不应该是类似于这种吗
interface Timer { void runDelayed(Runnable r, long step, TimeUnit tu); }
不应该
from vproxy.
from vproxy.
@wkgcass 说
这个接口设计是有原因的。因为selector要根据最近定时任务的时间poll,还要根据是否有定时任务来决定是否永久等待。而且定时任务还可以随时取消。
from vproxy.
这个接口设计是有原因的。因为selector要根据最近定时任务的时间poll,还要根据是否有定时任务来决定是否永久等待。而且定时任务还可以随时取消。
这里除了TimeElem的get方法是个util之外其他都是有实际作用的。
from vproxy.
@wkgcass 这块写的有点问题,如果差大于Integer.MAX_VALUE 2147483647就溢出了。建议改成
PriorityQueue<TimeElemImpl<T>> queue = new PriorityQueue<>(Comparator.comparingLong(elem -> elem.triggerTime));
from vproxy.
我在我的branch里改吧
from vproxy.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vproxy.