[Twisted-Python] Re : executing .rpy in a thread

Alex Levy mesozoic at polynode.com
Tue Sep 16 14:55:56 EDT 2003

On Tue, 2003-09-16 at 14:38, Jerome Jushima wrote:
> class Simple(resource.Resource):
>      isLeaf = True
>      def render(self, request):
>          d = threads.deferToThread(doLongPageGeneration)
>          d.addCallback(request.write)
>          d.addCallback(request.finish)
>          return "NOT_DONE_YET"

Should be:
        return server.NOT_DONE_YET

Alex Levy
WWW: http://mesozoic.geecs.org

"Never let your sense of morals prevent you from doing what is right."
-- Salvor Hardin, Isaac Asimov's _Foundation_

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20030916/9b4b2c04/attachment.pgp 

More information about the Twisted-Python mailing list