Skip to content

Switch ServiceBrowser query scheduling to use call_later instead of a loop#849

Merged
bdraco merged 70 commits into
python-zeroconf:masterfrom
bdraco:timer_handler
Jun 27, 2021
Merged

Switch ServiceBrowser query scheduling to use call_later instead of a loop#849
bdraco merged 70 commits into
python-zeroconf:masterfrom
bdraco:timer_handler

Conversation

@bdraco

@bdraco bdraco commented Jun 27, 2021

Copy link
Copy Markdown
Member
  • Simplifies scheduling as there is no more need to sleep in a loop as
    we now schedule future callbacks with call_later

  • Simplifies cancelation as there is no more coroutine to cancel, only a timer handle
    We no longer have to handle the canceled error and cleaning up the awaitable

  • Solves the infrequent test failures in test_backoff and test_integration

@bdraco bdraco marked this pull request as draft June 27, 2021 08:33
@codecov-commenter

codecov-commenter commented Jun 27, 2021

Copy link
Copy Markdown

Codecov Report

Merging #849 (12c8c16) into master (9f71e5b) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #849      +/-   ##
==========================================
- Coverage   98.63%   98.63%   -0.01%     
==========================================
  Files          22       22              
  Lines        2349     2339      -10     
  Branches      398      398              
==========================================
- Hits         2317     2307      -10     
  Misses         21       21              
  Partials       11       11              
Impacted Files Coverage Δ
zeroconf/aio.py 100.00% <ø> (ø)
zeroconf/_services/browser.py 98.29% <100.00%> (-0.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f71e5b...12c8c16. Read the comment docs.

@bdraco bdraco marked this pull request as ready for review June 27, 2021 17:08
@bdraco bdraco merged commit a8c1623 into python-zeroconf:master Jun 27, 2021
@bdraco bdraco deleted the timer_handler branch June 27, 2021 17:08
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