def shutdown(self):
    print('Shutdown initiated')
self.exit.set()
if __name__ == '__main__':
    process = MyProcess()
process.start()
print('Waiting for a while')
time.sleep(3)
process.shutdown()
time.sleep(3)
print('Child process state: %d' % process.is_alive())
Элегантный выход из многопроцессорной обработки Python Как?