Use call_soon_threadsafe() in notification manager

This commit is contained in:
Jeremy Grossmann 2024-11-18 12:13:41 +10:00 committed by GitHub
parent b37db57bb9
commit fa0d7d7529
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,7 +54,7 @@ class NotificationManager:
"""
for listener in self._listeners:
asyncio.get_event_loop().call_soon(listener.put_nowait, (action, event, kwargs))
asyncio.get_event_loop().call_soon_threadsafe(listener.put_nowait, (action, event, kwargs))
@staticmethod
def reset():