File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -596,15 +596,11 @@ where
596
596
let future_tx1: Py < PyAny > = py_fut. clone ( ) . into ( ) ;
597
597
let future_tx2 = future_tx1. clone_ref ( py) ;
598
598
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) ) ) ;
601
600
601
+ R :: spawn ( async move {
602
602
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 ( locals3, Cancellable :: new_with_cancel_rx ( fut, cancel_rx) ) . await ;
608
604
609
605
Python :: attach ( move |py| {
610
606
if cancelled ( future_tx1. bind ( py) )
You can’t perform that action at this time.
0 commit comments