Skip to content

Commit

Permalink
Kill process until it's killed
Browse files Browse the repository at this point in the history
  • Loading branch information
takuseno committed Dec 21, 2020
1 parent 03edccc commit 80d9ab6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion minerva/async_helper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import time

from multiprocessing import Process, Queue

RUNNING_PROCESSES = {}
Expand Down Expand Up @@ -33,4 +35,6 @@ def kill(uid):
if uid not in RUNNING_PROCESSES:
return
process, _ = RUNNING_PROCESSES[uid]
process.terminate()
while process.is_alive():
process.terminate()
time.sleep(0.1)

0 comments on commit 80d9ab6

Please sign in to comment.