Since this thing is on the innerwebs I suppose it should have a
[python_utils.git] / state_tracker.py
index b375f8928dc09c6f359d6e99846d06f1db947c5e..62eb183dba7bfc90a4bbbff73b4401f2d747231b 100644 (file)
@@ -1,9 +1,13 @@
 #!/usr/bin/env python3
 
+# © Copyright 2021-2022, Scott Gasch
+
 """Several helpers to keep track of internal state via periodic
 polling.  StateTracker expects to be invoked periodically to maintain
 state whereas the others automatically update themselves and,
-optionally, expose an event for client code to wait on state changes."""
+optionally, expose an event for client code to wait on state changes.
+
+"""
 
 import datetime
 import logging
@@ -109,7 +113,7 @@ class AutomaticStateTracker(StateTracker):
     """
 
     @background_thread
-    def pace_maker(self, should_terminate) -> None:
+    def pace_maker(self, should_terminate: threading.Event) -> None:
         """Entry point for a background thread to own calling heartbeat()
         at regular intervals so that the main thread doesn't need to do
         so.