Never shield-wait `ipc_server.wait_for_no_more_peers()`
As mentioned in prior testing commit, it can cause the worst kind of hangs, the SIGINT ignoring kind.. Pretty sure there was never any reason outside some esoteric multi-actor debugging case, and pretty sure that already was solved?to_asyncio_eoc_signal
							parent
							
								
									dd7aca539f
								
							
						
					
					
						commit
						4ca81e39e6
					
				|  | @ -1760,9 +1760,7 @@ async def async_main( | |||
|                 f'   {pformat(ipc_server._peers)}' | ||||
|             ) | ||||
|             log.runtime(teardown_report) | ||||
|             await ipc_server.wait_for_no_more_peers( | ||||
|                 shield=True, | ||||
|             ) | ||||
|             await ipc_server.wait_for_no_more_peers() | ||||
| 
 | ||||
|         teardown_report += ( | ||||
|             '-]> all peer channels are complete.\n' | ||||
|  |  | |||
|  | @ -814,10 +814,14 @@ class Server(Struct): | |||
| 
 | ||||
|     async def wait_for_no_more_peers( | ||||
|         self, | ||||
|         shield: bool = False, | ||||
|         # XXX, should this even be allowed? | ||||
|         # -> i've seen it cause hangs on teardown | ||||
|         #    in `test_resource_cache.py` | ||||
|         # _shield: bool = False, | ||||
|     ) -> None: | ||||
|         with trio.CancelScope(shield=shield): | ||||
|             await self._no_more_peers.wait() | ||||
|         await self._no_more_peers.wait() | ||||
|         # with trio.CancelScope(shield=_shield): | ||||
|         #     await self._no_more_peers.wait() | ||||
| 
 | ||||
|     async def wait_for_peer( | ||||
|         self, | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue