Skip to content
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

Merged
merged 12 commits into from
Jan 7, 2024

Conversation

KamToHung
Copy link
Collaborator

@KamToHung KamToHung commented Jan 6, 2024

添加优先队列

@yanhom1314
Copy link
Collaborator

加上 license header,ThreadPoolBuilder 里也加上吧

@KamToHung
Copy link
Collaborator Author

加上 license header,ThreadPoolBuilder 里也加上吧

已做修改~

@yanhom1314
Copy link
Collaborator

LGTM

@yanhom1314 yanhom1314 merged commit 87fa39c into dromara:master Jan 7, 2024
1 check passed
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());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这块应该用降序吧

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这块应该用降序吧

类似@order,感觉用升序好点?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

也行,加点注释吧,不然容易理解不一致

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

也行,加点注释吧,不然容易理解不一致

好,已添加注释

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants