[issue2871] store thread.get_ident() thread identifier inside threading.Thread objects

2008-05-15 Thread Irmen de Jong
New submission from Irmen de Jong <[EMAIL PROTECTED]>: I've ran into a problem where it would be very nice to be able to tell the tread.get_ident() of a given threading.Thread object. Currently, when creating a new Thread object, there is no good way of getting that thread's get_ident() value.

[issue2871] store thread.get_ident() thread identifier inside threading.Thread objects

2008-05-23 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > Currently, when creating a new Thread object, there is no good way of > getting that thread's get_ident() value. Well, how about doing it at the beginning of its run() method, e.g. in a Thread subclass: class MyThread(threading.Thread

[issue2871] store thread.get_ident() thread identifier inside threading.Thread objects

2008-05-23 Thread Irmen de Jong
Irmen de Jong <[EMAIL PROTECTED]> added the comment: Adding it in the run method would only work for threads that I create in my own code. The thing is: I need to be able to get the tread identification from threads created by third party code. So I cannot rely on that code putting it in the thre

[issue2871] store thread.get_ident() thread identifier inside threading.Thread objects

2008-05-24 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Well, it's true that get_ident() will always give you a reliable number while currentThread() can play dirty games on you at shutdown. The thing is the Thread object is dereferenced before the OS thread actually terminates, so it may be that a

[issue2871] store thread.get_ident() thread identifier inside threading.Thread objects

2008-05-24 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: This seems like a useful addition and is easy enough. Patch with tests and documentation attached. Unless I hear objections I will commit it to trunk later this week. Patch available for review here: http://codereview.appspot.com/1301 -

[issue2871] store thread.get_ident() thread identifier inside threading.Thread objects

2008-05-24 Thread Irmen de Jong
Irmen de Jong <[EMAIL PROTECTED]> added the comment: Thanks Gregory, for taking the time to make a patch. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bu

[issue2871] store thread.get_ident() thread identifier inside threading.Thread objects

2008-06-01 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: committed to trunk r63882 for inclusion in 2.6. -- resolution: -> fixed ___ Python tracker <[EMAIL PROTECTED]> ___

[issue2871] store thread.get_ident() thread identifier inside threading.Thread objects

2008-06-01 Thread Gregory P. Smith
Changes by Gregory P. Smith <[EMAIL PROTECTED]>: -- status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-li