[EMAIL PROTECTED] wrote at 2004-5-20 09:58 -0400: > ... >def new_publish(request, module_name, after_list, debug=0): > id = get_ident() > print "Localizer got thread id: " + str(id) > Publish._requests[id] = request > print "Request dict is now: " + str(Publish._requests) > x = Publish.old_publish(request, module_name, after_list, debug) > try: > del Publish._requests[id] > except KeyError: > ...
This code cannot leak requests in large numbers (though it may leak a few requests for some time). Reason: Zope does not normally create new threads. This implies that thread_ids are reused and thereby old requests flushed from the dict. -- Dieter _______________________________________________ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )