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

(feat) Enhancement with RepeatedTimer by HashedWheelTimer #258

Merged

Conversation

SteNicholas
Copy link
Contributor

@SteNicholas SteNicholas commented Aug 26, 2019

Motivation:

RepeatedTimer is implementation by java.util.Timer, there are some defects:

  1. Timer support for scheduling is based on absolute time.
  2. If an exception is thrown TimerTask unchecked.
  3. Timer single-threaded tasks, task execution time may be lost or inaccurate.

We need a better implementation based on io.netty.util.HashedWheelTimer of Netty.

Modification:

Modify RepeatedTimer implementation based on HashedWheelTimer.

Result:

Fixes #234

@fengjiachun
Copy link
Contributor

@SteNicholas 建议适当调小单测 RepeatedTimerTest 的 delta,应该对调度时间精度有更高要求了

@fengjiachun fengjiachun merged commit 49a7e9a into sofastack:master Aug 28, 2019
@fengjiachun fengjiachun added this to the 1.2.7 milestone Aug 29, 2019
@fengjiachun fengjiachun mentioned this pull request Nov 29, 2019
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(feat) Enhancement with RepeatedTimer
2 participants