Rename things

This commit is contained in:
Erik Johnston 2016-04-07 16:07:16 +01:00
parent ee5aef6c72
commit 95ac3078da

View file

@ -175,13 +175,13 @@ class Linearizer(object):
yield preserve_context_over_deferred(current_defer)
@contextmanager
def _ctx_manager(d):
def _ctx_manager():
try:
yield
finally:
d.callback(None)
d = self.key_to_defer.get(key)
if d is new_defer:
new_defer.callback(None)
current_d = self.key_to_defer.get(key)
if current_d is new_defer:
self.key_to_defer.pop(key, None)
defer.returnValue(_ctx_manager(new_defer))
defer.returnValue(_ctx_manager())