Report `trio.Cancelled` when exhausting portals..
For reliable remote cancellation we need to "report" `trio.Cancelled`s (just like any other error) when exhausting a portal such that the caller can make decisions about cancelling the respective actor if need be. Resolves #156bug_in_debug
							parent
							
								
									0e344eead8
								
							
						
					
					
						commit
						79c38b04e7
					
				| 
						 | 
				
			
			@ -112,6 +112,11 @@ async def exhaust_portal(
 | 
			
		|||
    except (Exception, trio.MultiError) as err:
 | 
			
		||||
        # we reraise in the parent task via a ``trio.MultiError``
 | 
			
		||||
        return err
 | 
			
		||||
    except trio.Cancelled as err:
 | 
			
		||||
        # lol, of course we need this too ;P
 | 
			
		||||
        # TODO: merge with above?
 | 
			
		||||
        log.warning(f"Cancelled result waiter for {portal.actor.uid}")
 | 
			
		||||
        return err
 | 
			
		||||
    else:
 | 
			
		||||
        log.debug(f"Returning final result: {final}")
 | 
			
		||||
        return final
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue