[Patches] [ python-Patches-452266 ] thread.kill_thread

noreply@sourceforge.net noreply@sourceforge.net
Sat, 18 Aug 2001 23:27:38 -0700


Patches item #452266, was opened at 2001-08-17 17:10
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=452266&group_id=5470

>Category: core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jason Petrone (jpetrone)
>Assigned to: Tim Peters (tim_one)
Summary: thread.kill_thread 

Initial Comment:
Function to unsafely kill a thread.  Implementations
are included for posix and nt.  If what I have looks
reasonable I will add other platforms + docs.

I've read Guido's usenet posts on this and 
understand the reasons against it, but I still think
it might be worth having.  Thread implementations 
like the ones in Java and win32 allow it with the
caveat that it could result in deadlock, 
corrupted data,  unclaimed resources, bodily harm, 
etc.  

Note that it also changes start_new_thread to return
the id for the new thread.


----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-18 23:27

Message:
Logged In: YES 
user_id=6380

Assigned to Tim for review of the Windows code.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-18 23:01

Message:
Logged In: YES 
user_id=6380

I'm +0 with this, so it can go in if people really want it.
(Though isn't this deprecated in Java?) The patch looks very
thorough. Some concerns:

- Patches for Doc/lib/libthread.tex (don't have to be
perfect LaTeX, but must document new functionality).

- For other OS thread implementations (e.g. pth, solaris,
beos, os2) the thread ID returned by the thread module is
always zero.

- Some pthread implementations seem to have an issue that
the thread-id as we calculate it is not necessarily unique,
due to the opaqueness of the pthread_t structure.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=452266&group_id=5470