From 1b7cd419f2e4156218f4cc064347106675999c14 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 8 Oct 2021 18:20:57 -0400 Subject: [PATCH] Drop old portal helper --- tractor/_spawn.py | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/tractor/_spawn.py b/tractor/_spawn.py index 779ff4f..8a2e7f4 100644 --- a/tractor/_spawn.py +++ b/tractor/_spawn.py @@ -91,35 +91,6 @@ def try_set_start_method(name: str) -> Optional[mp.context.BaseContext]: return _ctx -# async def exhaust_portal( -# portal: Portal, -# actor: Actor -# ) -> Any: -# """Pull final result from portal (assuming it has one). - -# If the main task is an async generator do our best to consume -# what's left of it. -# """ -# try: -# log.debug(f"Waiting on final result from {actor.uid}") - -# # XXX: streams should never be reaped here since they should -# # always be established and shutdown using a context manager api -# final = await portal.result() - -# 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 - - async def result_from_portal( portal: Portal, actor: Actor,