Author pitrou
Recipients irmen, pitrou
Date 2008-05-23.15:29:42
SpamBayes Score 0.00899939
Marked as misclassified No
Message-id <1211556584.89.0.0957294830892.issue2871@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2008-05-23 15:29:45pitrousetspambayes_score: 0.00899939 -> 0.00899939
recipients: + pitrou, irmen
2008-05-23 15:29:44pitrousetspambayes_score: 0.00899939 -> 0.00899939
messageid: <1211556584.89.0.0957294830892.issue2871@psf.upfronthosting.co.za>
2008-05-23 15:29:44pitroulinkissue2871 messages
2008-05-23 15:29:43pitroucreate