File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -1744,14 +1744,12 @@ async def run_child() -> Any:
1744
1744
async def _outbound_start_nexus_operation (
1745
1745
self , input : StartNexusOperationInput
1746
1746
) -> asyncio .Task :
1747
- # Function that runs in the handle
1747
+ handle : _NexusOperationHandle
1748
+
1748
1749
async def run_nexus () -> Any :
1749
- nonlocal handle
1750
1750
while True :
1751
- assert handle
1752
1751
try :
1753
- # We have to shield because we don't want the future itself
1754
- # to be cancelled
1752
+ # shield to prevent the future itself being cancelled
1755
1753
return await asyncio .shield (handle ._result_fut )
1756
1754
except asyncio .CancelledError :
1757
1755
raise NotImplementedError ("Nexus operation cancel not implemented" )
@@ -1761,11 +1759,11 @@ async def run_nexus() -> Any:
1761
1759
)
1762
1760
handle ._apply_schedule_command ()
1763
1761
self ._pending_nexus_operations [handle ._seq ] = handle
1762
+
1764
1763
# Wait on start before returning
1765
1764
while True :
1766
1765
try :
1767
- # We have to shield because we don't want the future itself
1768
- # to be cancelled
1766
+ # shield to prevent the future itself being cancelled
1769
1767
await asyncio .shield (handle ._start_fut )
1770
1768
return handle ._task
1771
1769
except asyncio .CancelledError :
You can’t perform that action at this time.
0 commit comments