-
Notifications
You must be signed in to change notification settings - Fork 741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE #283] add Priority executor #386
Conversation
加上 license header,ThreadPoolBuilder 里也加上吧 |
已做修改~ |
LGTM |
Runnable po1 = ((DtpRunnable) o1).getOriginRunnable(); | ||
Runnable po2 = ((DtpRunnable) o2).getOriginRunnable(); | ||
if (po1 instanceof Priority && po2 instanceof Priority) { | ||
return Integer.compare(((Priority) po1).getPriority(), ((Priority) po2).getPriority()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这块应该用降序吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这块应该用降序吧
类似@order,感觉用升序好点?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
也行,加点注释吧,不然容易理解不一致
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
也行,加点注释吧,不然容易理解不一致
好,已添加注释
添加优先队列