are properties thread safe in this context?

V

vegetax

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,237
Messages
2,571,189
Members
47,823
Latest member
eipamiri

Latest Threads

Top