feat(server.py): create a thread for _poll_loop
This commit is contained in:
@@ -34,6 +34,9 @@ class BackendServer:
|
|||||||
|
|
||||||
def start_polling(self) -> None:
|
def start_polling(self) -> None:
|
||||||
self.running = True
|
self.running = True
|
||||||
|
threading.Thread(
|
||||||
|
name="BackendServer thread", target=self._poll_loop, daemon=True
|
||||||
|
).start()
|
||||||
|
|
||||||
def _poll_loop(self) -> None:
|
def _poll_loop(self) -> None:
|
||||||
while self.running:
|
while self.running:
|
||||||
|
|||||||
Reference in New Issue
Block a user