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):
        def run(self):
            self.thread_ident = thread.get_ident()
            threading.Thread.run(self) # or any other stuff


Also, I don't think get_ident() is often useful when using the Threading
module, since you can just use the id() of the current Thread object
instead.

----------
nosy: +pitrou

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2871>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to