Code cleanup, make sure race conditions can't happen, at least in theory.
This commit is contained in:
@ -57,6 +57,9 @@ class driver(soundDriver):
|
||||
return
|
||||
self.cancel()
|
||||
self.mainloop.quit()
|
||||
# Wait for the GLib MainLoop thread to finish to prevent shutdown races
|
||||
if hasattr(self, 'thread') and self.thread.is_alive():
|
||||
self.thread.join(timeout=2.0) # 2 second timeout to prevent hanging
|
||||
|
||||
def _onPlayerMessage(self, bus, message):
|
||||
if not self._initialized:
|
||||
|
Reference in New Issue
Block a user