why doesn't python support to kill a thread?

multithreading, python

Solution

Killing threads isn't really very useful. Indeed, it usually causes trouble.

Killing a thread generall causes (at least) some of the following problems:

- Memory leak

- Other resource leak (file descriptors, etc)

- Deadlock (due to lock which is never unlocked by the killed thread)

Which are undesirable.

Don't do it.

Problem

Possible Duplicate: Is there any way to kill a Thread in Python? As we know pthread library supports pthread_kill() to kill a peer thread, but I'm just wondering why doesn't python support this feature? Any answer is helpful, thanks,:)

Original source

Related problems