]> git.ipfire.org Git - thirdparty/tornado.git/commit
Prevent leak of StackContexts in repeated gen.engine functions.
authorBen Darnell <ben@bendarnell.com>
Mon, 21 May 2012 05:08:59 +0000 (22:08 -0700)
committerBen Darnell <ben@bendarnell.com>
Mon, 21 May 2012 05:08:59 +0000 (22:08 -0700)
commit57a3f83fc6b6fa4d9c207dc078a337260863ff99
treec23028f22ab43e8f2c793b0ae9111939cc05a20f
parent1be0cc4c2ce96907e2d0af9b2ce31edb89496f75
Prevent leak of StackContexts in repeated gen.engine functions.

Internally, StackContexts now return a deactivation callback,
which can be used to prevent that StackContext from propagating
further.  This is used in gen.engine because the decorator doesn't know
which arguments are callbacks that need to be wrapped outside of its
ExceptionStackContext.  This is deliberately undocumented for now.

Closes #507.
tornado/gen.py
tornado/stack_context.py
tornado/test/gen_test.py
tornado/test/stack_context_test.py