Skip to content
This repository has been archived by the owner on Apr 2, 2018. It is now read-only.

Timer with duration longer than num-slots * tick-duration fails silently #38

Open
DarrenTsung opened this issue Mar 2, 2018 · 0 comments

Comments

@DarrenTsung
Copy link

Recently tried to use this timer for expiring a connection that was alive for over an 1hr 5mins (3,900,000ms), which is larger than the default values for num-slots (4,096 by default) and tick-duration (100ms by default).

Tested behavior was that the timer did not go off and notify the Future properly.

Possible solutions:

  1. Return Result<()> for sleep(), timeout(), etc. where logic is checked such that duration <= num-slots * tick-duration.
  2. Dynamically change num-slots or tick-duration (whichever makes sense) such that duration is scheduled correctly.

Any thoughts on the right way to proceed? Right now I can just adjust the tick-duration to 1000ms as I don't need precision, and I think I can work on a PR next week.

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

No branches or pull requests

1 participant