forked from goodboy/tractor
Hide some portal stack layers in tracebacks
parent
1b7cd419f2
commit
5df08aabb7
|
@ -65,16 +65,15 @@ def _trio_main(
|
|||
parent_addr: Tuple[str, int] = None,
|
||||
infect_asyncio: bool = False,
|
||||
) -> None:
|
||||
"""Entry point for a `trio_run_in_process` subactor.
|
||||
"""
|
||||
# Disable sigint handling in children;
|
||||
# we don't need it thanks to our cancellation machinery.
|
||||
Entry point for a `trio_run_in_process` subactor.
|
||||
|
||||
"""
|
||||
log.info(f"Started new trio process for {actor.uid}")
|
||||
|
||||
# Disable sigint handling in children?
|
||||
# signal.signal(signal.SIGINT, signal.SIG_IGN)
|
||||
|
||||
log.info(f"Started new trio process for {actor.uid}")
|
||||
|
||||
log.info(f"Started new trio process for {actor.uid}")
|
||||
|
||||
if actor.loglevel is not None:
|
||||
log.info(
|
||||
f"Setting loglevel for {actor.uid} to {actor.loglevel}")
|
||||
|
|
|
@ -129,6 +129,7 @@ class Portal:
|
|||
resptype: str,
|
||||
first_msg: dict
|
||||
) -> Any:
|
||||
__tracebackhide__ = True
|
||||
assert resptype == 'asyncfunc' # single response
|
||||
|
||||
msg = await recv_chan.receive()
|
||||
|
@ -140,8 +141,11 @@ class Portal:
|
|||
raise unpack_error(msg, self.channel)
|
||||
|
||||
async def result(self) -> Any:
|
||||
"""Return the result(s) from the remote actor's "main" task.
|
||||
"""
|
||||
Return the result(s) from the remote actor's "main" task.
|
||||
|
||||
"""
|
||||
__tracebackhide__ = True
|
||||
# Check for non-rpc errors slapped on the
|
||||
# channel for which we always raise
|
||||
exc = self.channel._exc
|
||||
|
|
Loading…
Reference in New Issue