stop it?
"killing" threads is a bad pattern and you should avoid it, threads should stop by themselves when their job is finished, if you want a way to stop a thread you can use a control structure to send some kind of signal for the thread to stop its execution loop, or you can set it as daemon and then it will be stopped when the main thread finishes, here you can find more info https://www.geeksforgeeks.org/python-different-ways-to-kill-a-thread/
Send a message to the thread so it stops by itself.
why not use multiprocessing
Обсуждают сегодня