MCPcopy Index your code
hub / github.com/battlecode/battlecode-2018 / destroy

Method destroy

battlecode-manager/player_plain.py:87–96  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

85 self.paused = False
86
87 def destroy(self):
88 if self.process is not None:
89 tmp = self.process
90 # This will signal to the log thread that everything is going to be shut down
91 # and ignore any future messages. In particular bash may log something like 'Terminated: <PID>'
92 # which would pollute the output of this script.
93 self.process = None
94 reap(tmp)
95 self.process = None
96 super().destroy()
97
98def reap(process, timeout=3):
99 "Tries hard to terminate and ultimately kill all the children of this process."

Callers 2

cleanupFunction · 0.45
messageMethod · 0.45

Calls 1

reapFunction · 0.85

Tested by

no test coverage detected