File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -596,15 +596,11 @@ where
596596    let  future_tx1:  Py < PyAny >  = py_fut. clone ( ) . into ( ) ; 
597597    let  future_tx2 = future_tx1. clone_ref ( py) ; 
598598
599-     R :: spawn ( async  move  { 
600-         let  locals2 = Python :: attach ( |py| locals. clone_ref ( py) ) ; 
599+     let  ( locals2,  locals3)  = Python :: attach ( |py| ( locals. clone_ref ( py) ,  locals. clone_ref ( py) ) ) ; 
601600
601+     R :: spawn ( async  move  { 
602602        if  let  Err ( e)  = R :: spawn ( async  move  { 
603-             let  result = R :: scope ( 
604-                 Python :: attach ( |py| locals2. clone_ref ( py) ) , 
605-                 Cancellable :: new_with_cancel_rx ( fut,  cancel_rx) , 
606-             ) 
607-             . await ; 
603+             let  result = R :: scope ( locals2,  Cancellable :: new_with_cancel_rx ( fut,  cancel_rx) ) . await ; 
608604
609605            Python :: attach ( move  |py| { 
610606                if  cancelled ( future_tx1. bind ( py) ) 
@@ -615,7 +611,7 @@ where
615611                } 
616612
617613                let  _ = set_result ( 
618-                     & locals2 . event_loop ( py) , 
614+                     & locals3 . event_loop ( py) , 
619615                    future_tx1. bind ( py) , 
620616                    result. and_then ( |val| val. into_py_any ( py) ) , 
621617                ) 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments