[Code] Fwd: python-openid server thread-safe methods?
michail alexakis
alexakis at imis.athena-innovation.gr
Wed Sep 11 07:15:20 UTC 2013
Hello to all
I have posted the same question yesterday, but since i was a non-subscribed
user, it probably
got automatically rejected. So, i re-send my question verbatim, and i
apologize for the duplicate:
I am using the server component (OP provider) from the python-openid
library (class openid.server.server:Server)
inside a (Pylons-based) web application that spawns about 5-10 threads for
serving requests.
To be precise, the following methods are invoked in several places:
Server.decodeRequest
Server.handleRequest
Server.encodeResponse
Can i assume that these calls are thread-safe?
I suppose that if these methods alter the inner state of the Server's
instance, then it's a matter of time (and traffic)
to see unpredictable behavior.
Shall i wrap all these methods (maybe a proxy object) and implement my own
locking?
Another similar question is how safe is the store mechanism? The docs state
that the FileStore class is reasonably safe.
Τhanks for your time!
Michail Alexakis,
Software engineer, Athens, Greece
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openid.net/pipermail/openid-code/attachments/20130911/b3d6eadf/attachment.html>
More information about the Code
mailing list