MCPcopy Index your code
hub / github.com/datacamp/pythonwhat / kill

Method kill

pythonwhat/local.py:103–116  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

101 return self.result_queue.get() # wait and fetches next item in queue
102
103 def kill(self):
104 try:
105 if self.is_alive():
106 self.executeTask(TaskKillProcess())
107 self.join(timeout=3.0)
108 if self.is_alive():
109 self.terminate()
110 self.join(timeout=3.0)
111 if self in self.instances:
112 self.instances.remove(self)
113 finally:
114 pass
115 # python 3.7:
116 # self.close()
117
118 @classmethod
119 def kill_all(cls):

Callers 1

kill_allMethod · 0.80

Calls 2

executeTaskMethod · 0.95
TaskKillProcessClass · 0.85

Tested by

no test coverage detected