current position:Home>Python \ thread termination process

Python \ thread termination process

2022-09-09 05:02:34CSDN Q&A

I now have such a code structure
A1.py class A --gui interface
A2.py class B --main function
A3.py class C --listen to keyboard events, hopeTerminate B
Click the run button on the gui interface to start B and C through multi-threading
But when C executes sys.exit(), it can only end C itself, and B will continue to run
Try B and C to write the same class and still the same
How to use C to terminate B

copyright notice
author[CSDN Q&A],Please bring the original link to reprint, thank you.
https://en.pythonmana.com/2022/252/202209021348524944.html

Random recommended