eryksun added the comment:

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

----------
nosy: +eryksun

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24020>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to