This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients docs@python, eryksun, ethan.furman
Date 2015-04-21.14:00:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429624821.5.0.944414118077.issue24020@psf.upfronthosting.co.za>
In-reply-to
Content
Could you clarify what the problem is? I have no apparent problem using threading.local in a function scope:

    import threading

    def f():
        tlocal = threading.local()
        tlocal.x = 0
        def g():
            tlocal.x = 1
            print('tlocal.x in g:', tlocal.x)
        t = threading.Thread(target=g)
        t.start()
        t.join()
        print('tlocal.x in f:', tlocal.x)

    >>> f()
    tlocal.x in g: 1
    tlocal.x in f: 0
History
Date User Action Args
2015-04-21 14:00:21eryksunsetrecipients: + eryksun, docs@python, ethan.furman
2015-04-21 14:00:21eryksunsetmessageid: <1429624821.5.0.944414118077.issue24020@psf.upfronthosting.co.za>
2015-04-21 14:00:21eryksunlinkissue24020 messages
2015-04-21 14:00:21eryksuncreate