forked from goodboy/tractor
				
			Tweak log msg
							parent
							
								
									63a5036e6e
								
							
						
					
					
						commit
						8f15f438c7
					
				|  | @ -95,7 +95,7 @@ async def run_task( | ||||||
|         nonlocal err |         nonlocal err | ||||||
|         err = task.exception() |         err = task.exception() | ||||||
|         if err: |         if err: | ||||||
|             log.exception("asyncio task errorred:") |             log.exception(f"asyncio task errorred:\n{err}") | ||||||
|         cancel_scope.cancel() |         cancel_scope.cancel() | ||||||
| 
 | 
 | ||||||
|     task.add_done_callback(cancel_trio) |     task.add_done_callback(cancel_trio) | ||||||
|  | @ -116,6 +116,7 @@ async def run_task( | ||||||
| 
 | 
 | ||||||
|     # simple async func |     # simple async func | ||||||
|     elif inspect.iscoroutine(coro): |     elif inspect.iscoroutine(coro): | ||||||
|  | 
 | ||||||
|         with cancel_scope: |         with cancel_scope: | ||||||
|             # return single value |             # return single value | ||||||
|             return await from_aio.receive() |             return await from_aio.receive() | ||||||
|  | @ -123,6 +124,7 @@ async def run_task( | ||||||
|             raise err |             raise err | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| def run_as_asyncio_guest( | def run_as_asyncio_guest( | ||||||
|     trio_main: Callable, |     trio_main: Callable, | ||||||
| ) -> None: | ) -> None: | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue