Mike Orr wrote:
> On Fri, Mar 7, 2008 at 2:37 PM, Ian Bicking <[EMAIL PROTECTED]> wrote:
>> Mike Orr wrote:
>>  > A couple issues have come up which can only be solved jointly by
>>  > Pylons and Paste.
>>  >
>>  > http://pylonshq.com/project/pylonshq/ticket/388
>>  > Handling premature client disconnects
>>
>>  I think to do this right it needs to be defined in WSGI.
> 
> Could generator pushback be used for this?  I.e., the server takes a
> chunk of content from the application and pushes back the connection
> status or throws an exception.  The action can read the status or
> catch the exception if it wants to, or ignore it for the default
> behavior.

I think Python 2.5's generator/iterator extensions could handle this, 
with gen.throw().  Presumably this is fine to do now.

> One issue is it couldn't abort the action until it has yielded the
> first chunk, which in many cases is after the main processing has been
> done.

Yes; I *think* this is still the case with Python 2.5.  Though if you 
are willing to do "yield ''" first, before you do work, you'd be fine.

   Ian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to