mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-29 18:54:07 +03:00
Don't terminate a process that isn't alive
This commit is contained in:
parent
a4fdec9005
commit
421b23ae5c
|
@ -385,7 +385,9 @@ def test_autoport(en_vocab):
|
||||||
proc1.terminate()
|
proc1.terminate()
|
||||||
proc2.terminate()
|
proc2.terminate()
|
||||||
finally:
|
finally:
|
||||||
|
if proc1.is_alive():
|
||||||
proc1.terminate()
|
proc1.terminate()
|
||||||
|
if proc2.is_alive():
|
||||||
proc2.terminate()
|
proc2.terminate()
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
proc1.close()
|
proc1.close()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user