Compare commits

..

No commits in common. "a6058d14ae8be5d9de718be5dfcfac4fc399c837" and "408a74784e7c549db0d1f177137819867e5b9ad6" have entirely different histories.

3 changed files with 217 additions and 554 deletions

View File

@ -1,5 +1,6 @@
from functools import partial
import time
from threading import current_thread
import trio
import tractor
@ -15,9 +16,17 @@ def sync_pause(
time.sleep(pre_sleep)
if use_builtin:
print(
f'Entering `breakpoint()` from\n'
f'{current_thread()}\n'
)
breakpoint(hide_tb=hide_tb)
else:
print(
f'Entering `tractor.pause_from_sync()` from\n'
f'{current_thread()}@{tractor.current_actor().uid}\n'
)
tractor.pause_from_sync()
if error:

View File

@ -12,8 +12,11 @@ TODO:
"""
from functools import partial
import itertools
# from os import path
from typing import Optional
import platform
import pathlib
# import sys
import time
import pytest
@ -26,7 +29,6 @@ from pexpect.exceptions import (
from tractor.devx._debug import (
_pause_msg,
_crash_msg,
_repl_fail_msg,
)
from tractor._testing import (
examples_dir,
@ -291,7 +293,7 @@ def do_ctlc(
child,
count: int = 3,
delay: float = 0.1,
patt: str|None = None,
patt: Optional[str] = None,
# expect repl UX to reprint the prompt after every
# ctrl-c send.
@ -1304,7 +1306,7 @@ def test_shield_pause(
[
_crash_msg,
"('cancelled_before_pause'", # actor name
_repl_fail_msg,
"Failed to engage debugger via `_pause()`",
"trio.Cancelled",
"raise Cancelled._create()",
@ -1322,7 +1324,7 @@ def test_shield_pause(
[
_crash_msg,
"('root'", # actor name
_repl_fail_msg,
"Failed to engage debugger via `_pause()`",
"trio.Cancelled",
"raise Cancelled._create()",

File diff suppressed because it is too large Load Diff