Skip to content

feat:延迟队列依赖库#237

Open
superName-w wants to merge 8 commits intonetease-lcap:mainfrom
superName-w:wgx-delayqueue-util
Open

feat:延迟队列依赖库#237
superName-w wants to merge 8 commits intonetease-lcap:mainfrom
superName-w:wgx-delayqueue-util

Conversation

@superName-w
Copy link
Contributor

No description provided.

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

*/
@NaslLogic
public DelayedTask pollWithTimeout(Long timeout) {
// 检查延迟队列是否已初始化
Copy link
Collaborator

Choose a reason for hiding this comment

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

在每个方法中都检查了 delayQueue 是否已初始化。这虽然是一种安全的做法,但会导致代码重复。可以考虑将这个检查提取到一个私有方法中,以减少代码冗余。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已优化,将这块逻辑封装成了一个私有方法,应用到方法中。

@github-actions
Copy link
Contributor

@lyjamare
Copy link
Collaborator

功能及代码已验收,待评分

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.

2 participants

Comments