Public Member Functions | |
def | __enter__ |
def | __exit__ |
def | __init__ |
def | enter |
def | exit |
Public Attributes | |
active | |
context_factory | |
contexts | |
new_contexts | |
old_contexts | |
Private Member Functions | |
def | _deactivate |
Establishes the given context as a StackContext that will be transferred. Note that the parameter is a callable that returns a context manager, not the context itself. That is, where for a non-transferable context manager you would say:: with my_context(): StackContext takes the function itself rather than its result:: with StackContext(my_context): The result of ``with StackContext() as cb:`` is a deactivation callback. Run this callback when the StackContext is no longer needed to ensure that it is not propagated any further (note that deactivating a context does not affect any instances of that context that are currently pending). This is an advanced feature and not necessary in most applications.
Definition at line 88 of file stack_context.py.
def tornado.stack_context.StackContext.__init__ | ( | self, | |
context_factory | |||
) |
Definition at line 108 of file stack_context.py.
def tornado.stack_context.StackContext.__enter__ | ( | self | ) |
Definition at line 129 of file stack_context.py.
def tornado.stack_context.StackContext.__exit__ | ( | self, | |
type, | |||
value, | |||
traceback | |||
) |
Definition at line 142 of file stack_context.py.
def tornado.stack_context.StackContext._deactivate | ( | self | ) | [private] |
Definition at line 113 of file stack_context.py.
def tornado.stack_context.StackContext.enter | ( | self | ) |
Definition at line 117 of file stack_context.py.
def tornado.stack_context.StackContext.exit | ( | self, | |
type, | |||
value, | |||
traceback | |||
) |
Definition at line 122 of file stack_context.py.
Definition at line 108 of file stack_context.py.
Definition at line 108 of file stack_context.py.
Definition at line 108 of file stack_context.py.
Definition at line 129 of file stack_context.py.
Definition at line 129 of file stack_context.py.