handle timeout attribute at __init__ instead of when starting the timer.#243
handle timeout attribute at __init__ instead of when starting the timer.#243Vizonex wants to merge 3 commits into
__init__ instead of when starting the timer.#243Conversation
__init__ instead of when starting the timer.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #243 +/- ##
==========================================
+ Coverage 98.46% 98.53% +0.06%
==========================================
Files 5 5
Lines 1433 1432 -1
Branches 74 74
==========================================
Hits 1411 1411
Misses 16 16
+ Partials 6 5 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Unlike before, we lose track of the original timeout with your change. I need to check if that has actual implications here. |
|
Have you actually tested this? It's broken. The reason why we used a different timeout for arming our timer is because of some old c-ares bug IIRC, that's why we poll every 100 ms. Probably worth revisiting, since a lot has changed since. The real timeout needs to be passed to to c-ares unmodified, of course. Note, however, that our own timer will now only be used in the fallback case, since we use the event thread by default, which doesn't need it. |
What do these changes do?
This change moves the timeout to a better more optimized location which will ultimately increase the performance of the timeout loop.
Are there changes in behavior for the user?
There aren't any. In fact nothing new needs to be added in which is a bonus.
Related issue number
Checklist