<div dir="ltr">Hello to all<div><div class="gmail_quote"><div dir="ltr"><font face="tahoma, sans-serif"></font><div><font face="tahoma, sans-serif"><br></font></div><div><font face="tahoma, sans-serif">I have posted the same question yesterday, but since i was a non-subscribed user, it probably<br>
</font></div><div><font face="tahoma, sans-serif">got automatically rejected. So, i re-send my question verbatim, and i apologize for the duplicate:<br></font></div><div><font face="tahoma, sans-serif"><br></font></div><div>
<font face="tahoma, sans-serif">I am using the server component (OP provider) from the python-openid library (class openid.server.server:Server)</font></div>
<div><font face="tahoma, sans-serif">inside a (Pylons-based) web application that spawns about 5-10 threads for serving requests.</font></div><div><font face="tahoma, sans-serif"><br></font></div><div><font face="tahoma, sans-serif">To be precise, the following methods are invoked in several places:</font></div>
<div><font face="tahoma, sans-serif"><br></font></div><div><font face="tahoma, sans-serif">Server.decodeRequest</font></div><div><font face="tahoma, sans-serif">Server.handleRequest</font></div><div><font face="tahoma, sans-serif">Server.encodeResponse</font></div>
<div><font face="tahoma, sans-serif"><br></font></div><div><font face="tahoma, sans-serif">Can i assume that these calls are thread-safe?</font></div><div><font face="tahoma, sans-serif">I suppose that if these methods alter the inner state of the Server's instance, then it's a matter of time (and traffic) </font></div>
<div><font face="tahoma, sans-serif">to see unpredictable behavior. </font></div><div><font face="tahoma, sans-serif">Shall i wrap all these methods (maybe a proxy object) and implement my own locking?</font></div><div><font face="tahoma, sans-serif"><br>
</font></div><div><font face="tahoma, sans-serif">Another similar question is how safe is the store mechanism? The docs state that the FileStore class is reasonably safe. </font></div><div><font face="tahoma, sans-serif"><br>
</font></div><div><font face="tahoma, sans-serif">Τhanks for your time!</font></div><span class="HOEnZb"><font color="#888888"><div><font face="tahoma, sans-serif"><br></font></div><div><font face="tahoma, sans-serif">Michail Alexakis, </font></div>
<div><font face="tahoma, sans-serif">Software engineer, Athens, Greece</font></div>
</font></span></div>
</div><br></div></div>