Message92603
the xmlrpclib.ServerProxy is not thread safe, no. Nor is it designed to
be. the documentation never claims that it is and the fact that the old
version was (due to a new HTTPConnection being created each time) is a
coincidence than a design feature.
In my own client code I use a pool of ServerProxy objects for each
thread to claim and use one at a time. This way I can have many
simultaneous requests to the same server going.
You can also create your own lock and share a ServerProxy among threads.
Also note that HTTPConnection is not thread safe either. And in
general, class instances in the lib are not thread safe unless
explicitly documented to be so. |
|
Date |
User |
Action |
Args |
2009-09-14 11:10:53 | kristjan.jonsson | set | recipients:
+ kristjan.jonsson, vstinner |
2009-09-14 11:10:52 | kristjan.jonsson | set | messageid: <1252926652.97.0.782047315783.issue6907@psf.upfronthosting.co.za> |
2009-09-14 11:10:51 | kristjan.jonsson | link | issue6907 messages |
2009-09-14 11:10:49 | kristjan.jonsson | create | |
|