On Tue, May 31, 2011 at 7:04 AM, victor.stinner <python-check...@python.org> wrote: > +.. function:: get_ident() > + > + Return the 'thread identifier' of the current thread. This is a nonzero > + integer. Its value has no direct meaning; it is intended as a magic > cookie > + to be used e.g. to index a dictionary of thread-specific data. Thread > + identifiers may be recycled when a thread exits and another thread is > + created.
That's not quite true - the Thread id isn't relinquished until the Thread object itself is destroyed, rather than when the underlying thread finishes execution (i.e. the lifecycle of a_thread.ident is the same as that of id(a_thread)). Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com