Sujet : Re: How to stop a specific thread in Python 2.7?
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.lang.pythonDate : 25. Sep 2024, 19:39:37
Autres entêtes
Organisation : Stefan Ram
Message-ID : <threads-20240925183826@ram.dialup.fu-berlin.de>
References : 1
marc nicole <
mk1853387@gmail.com> wrote or quoted:
I want to know how to kill a specific running thread (say by its id)
Killing or stopping a thread can cause data corruption and
unpredictable behavior. It's better to use a more chill
approach like setting a flag to let the thread know when to
wrap it up and exit gracefully. If you really need to terminate
something abruptly, go for a process instead of a thread.