Commit 76d35df8 authored by David Wilson's avatar David Wilson

master: use decorators rather than call_with_deadline(with_context=..)

parent 5dff2218
......@@ -738,7 +738,8 @@ def upgrade_router(econtext):
ModuleForwarder(econtext.router, econtext.parent, econtext.importer)
def _proxy_connect(econtext, name, context_id, method_name, kwargs):
@mitogen.core.takes_econtext
def _proxy_connect(name, context_id, method_name, kwargs, econtext):
upgrade_router(econtext)
context = econtext.router._connect(
context_id,
......@@ -855,8 +856,8 @@ class Router(mitogen.core.Router):
context_id = self.allocate_id()
# Must be added prior to _proxy_connect() to avoid a race.
self.add_route(context_id, via_context.context_id)
name = via_context.call_with_deadline(None, True,
_proxy_connect, name, context_id, method_name, kwargs
name = via_context.call(_proxy_connect,
name, context_id, method_name, kwargs
)
# name = '%s.%s' % (via_context.name, name)
context = Context(self, context_id, name=name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment