0

I would need a way to stop a thread that has been created. The thread performs a function that will never come to an end and I would need to be able to control it. Do you know how to do this? Thanks in advance. I had tried with:

t = threading.Thread(target=job).start()
.
.
t.join()

but it doesn't seem to work..

Memole
  • 1
  • 1
    There is no way to kill a thread, aside from accessing interpreter internals. Use a ``daemon`` Thread if you want it to die along with the rest of the program, or make the payload itself aware of shutdown. – MisterMiyagi Jul 08 '21 at 12:24

0 Answers0