are properties thread safe in this context?

vegetax vegeta.z at gmail.com
Sun May 1 19:23:16 EDT 2005


Class Req:
    def __init__(s,headers):
        s.headers = headers

    referer =\ 
    property(lambda s:s.headers['Connection'],
             lambda s,v:s.headers.__setitem__('referer',v))

each thread has its own instance of class Req, Req instances are not shared
between threads





More information about the Python-list mailing list