[Python-Dev] This seems like a bug - main thread has None ident???

skip at pobox.com skip at pobox.com
Tue Mar 31 22:11:12 CEST 2009

Looking for some quick feedback on this.  I've bumped into what looks like a
bug in the threading module.  From the interpreter prompt:

    >>> import threading
    >>> threading.currentThread()
    <_MainThread(MainThread, started)>
    >>> print threading.currentThread().ident

The ident attribute is documented as being a number unless the thread has
yet to be started.  Shouldn't the main thread's ident attribute *always*
be non-None?  Clearly, it appears the main thread has been started.

Am I missing something obvious or have I hit a bug?  This is a fully updated
2.7a0 build, trunk:70878M.


More information about the Python-Dev mailing list