Hi!

Umm... a totally newbie to Tornado, but after browsing the code, they are
"dancing the conga" ;-) to have such behavior.

See
https://github.com/facebook/tornado/blob/master/tornado/stack_context.py

and how its wrap function is used at:
https://github.com/facebook/tornado/blob/master/tornado/httpserver.py

It's an "ad-hoc" solution for the web request. And I think Python has
programatic access to the "current context", to be confirmed

Angel "Java" Lopez
@ajlopez




On Fri, Apr 5, 2013 at 5:56 AM, Nicolas Grilly <[email protected]>wrote:

> On Friday, April 5, 2013 5:40:54 AM UTC+2, Forrest L Norvell wrote:
>
>> Realistically speaking, there's no way to write a general "async finally"
>> in Node. Side effects are just too pervasive, and while if you're careful
>> you can ensure that resources are properly cleaned up, it's not a problem
>> that can be automated.
>>
>
> I read everywhere it's very difficult to write a kind of "async finally"
> in Node because side effects are too pervasive and resources will be
> leaked, etc.
>
> In that case, why Tornado strategy regarding error handling is so
> radically different [1]? It is also an async server. It is also based on a
> dynamic language very comparable to Python. But instead of crashing and
> restart the process after every unexpected error, they send an error page,
> close the request/response, and go on with the next loop.
>
> [1] http://www.tornadoweb.org/en/stable/overview.html#error-handling
>
> I would be very interested to understand why this strategy is okay for
> Tornado but is not okay for Node.
>
>>  --
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to