[Twisted-Python] xmlrpc protocoll instanze per connection?

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Mon Aug 9 07:18:09 MDT 2010


On 12:07 pm, petshmidt at googlemail.com wrote:
>[snip]
>>
>>If you want a new XMLRPC instance per request, then create a new one 
>>per
>>request.  http://twistedmatrix.com/documents/current/web/howto/web- 
>>in-60
>>/dynamic-dispatch.html may help.
>
>This works for me too. getChild() returns for each request new
>instance. When is this object destroyed? I've putted print into
>__del__, but can't see it in log.

At the same time any Python object is destroyed, when there are no more 
references to it.  Twisted won't keep any references to it after the 
response has been completely generated.  So as long as your code also 
keeps no references, it will be destroyed shortly after each request.

Jean-Paul




More information about the Twisted-Python mailing list