mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
add a small .wait() after terminating player process
Avoids python3.8/subprocess.py:942: ResourceWarning: subprocess 90387 is still running _warn("subprocess %s is still running" % self.pid,
This commit is contained in:
parent
0671e7e712
commit
b9d42af423
1 changed files with 1 additions and 0 deletions
|
@ -312,6 +312,7 @@ class SimpleProcessPlayer(Player): # pylint: disable=abstract-method
|
||||||
# should we abort playing?
|
# should we abort playing?
|
||||||
if self._terminate_flag:
|
if self._terminate_flag:
|
||||||
self._process.terminate()
|
self._process.terminate()
|
||||||
|
self._process.wait(1)
|
||||||
self._process = None
|
self._process = None
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue