mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 23:37:18 +00:00
do not terminate child process explicitly
This feature sometimes causes the main process termination. Since the child process has been already terminated (or going to) there is no need to terminate it manually
This commit is contained in:
parent
5627c9cca0
commit
d064e46af6
@ -172,7 +172,6 @@ class Spawn(Thread, LazyLogging):
|
|||||||
process = self.active.pop(process_id, None)
|
process = self.active.pop(process_id, None)
|
||||||
|
|
||||||
if process is not None:
|
if process is not None:
|
||||||
process.terminate() # make sure lol
|
|
||||||
process.join()
|
process.join()
|
||||||
|
|
||||||
def stop(self) -> None:
|
def stop(self) -> None:
|
||||||
|
@ -140,9 +140,7 @@ def test_run_pop(spawner: Spawn) -> None:
|
|||||||
|
|
||||||
spawner.run()
|
spawner.run()
|
||||||
|
|
||||||
first.terminate.assert_called_once_with()
|
|
||||||
first.join.assert_called_once_with()
|
first.join.assert_called_once_with()
|
||||||
second.terminate.assert_called_once_with()
|
|
||||||
second.join.assert_called_once_with()
|
second.join.assert_called_once_with()
|
||||||
assert not spawner.active
|
assert not spawner.active
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user