Skip to content

Conversation

@raylu
Copy link

@raylu raylu commented Jul 9, 2025

the watchdog reloader waits until the end of the ReloaderLoop.interval to actually reload
by replacing time.sleep with a timeout on threading.Event, we wake up just in time
this allows increasing the interval to reduce idle CPU usage

fixes #3054

@raylu
Copy link
Author

raylu commented Jul 9, 2025

  • I didn't update CHANGES.rst; let me know if you think this warrants a changelog entry
  • I didn't write tests; it seems pretty tricky to test
  • I did a no-op refactor in the first commit so I recommend reviewing the two commits separately. happy to open a separate PR if you prefer

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.

watchdog reloader uses excessive CPU

1 participant