Skip to content
Snippets Groups Projects
Commit ffeafade authored by Erik Johnston's avatar Erik Johnston
Browse files

Update comment

parent f5bb1531
No related branches found
Tags v1.64.0
No related merge requests found
......@@ -627,8 +627,10 @@ def make_deferred_yieldable(deferred):
(This is more-or-less the opposite operation to run_in_background.)
"""
if inspect.isawaitable(deferred):
# If we're given a coroutine we need to convert it to a deferred so that
# we can attach callbacks (and not immediately return).
# If we're given a coroutine we convert it to a deferred so that we
# run it and find out if it immediately finishes, it it does then we
# don't need to fiddle with log contexts at all and can return
# immediately.
deferred = defer.ensureDeferred(deferred)
if not isinstance(deferred, defer.Deferred):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment