File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -6,21 +6,25 @@ async def gen():
6
6
yield 'yo'
7
7
await tractor .breakpoint ()
8
8
yield 'yo'
9
+ await tractor .breakpoint ()
9
10
10
11
11
12
@tractor .context
12
13
async def just_bp (
13
14
ctx : tractor .Context ,
14
15
) -> None :
15
16
16
- await ctx .started ('yo bpin here' )
17
+ await ctx .started ()
17
18
await tractor .breakpoint ()
18
19
19
20
# TODO: bps and errors in this call..
20
- # async for val in gen():
21
- # print(val)
21
+ async for val in gen ():
22
+ print (val )
23
+
24
+ # await trio.sleep(0.5)
22
25
23
- await trio .sleep (0.5 )
26
+ # prematurely destroy the connection
27
+ await ctx .chan .aclose ()
24
28
25
29
# THIS CAUSES AN UNRECOVERABLE HANG
26
30
# without latest ``pdbpp``:
@@ -30,20 +34,15 @@ async def just_bp(
30
34
31
35
async def main ():
32
36
async with tractor .open_nursery (
33
- # loglevel='transport',
34
37
debug_mode = True ,
35
38
) as n :
36
39
p = await n .start_actor (
37
40
'bp_boi' ,
38
41
enable_modules = [__name__ ],
39
- # debug_mode=True,
40
42
)
41
43
async with p .open_context (
42
44
just_bp ,
43
45
) as (ctx , first ):
44
-
45
- # await tractor.breakpoint()
46
- # breakpoint()
47
46
await trio .sleep_forever ()
48
47
49
48
You can’t perform that action at this time.
0 commit comments