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 class A --gui interface class B --main function 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.

Random recommended