Remove tractor run from some debug examples
parent
8fabd27dbe
commit
b7b2436bc1
|
@ -17,10 +17,13 @@ async def name_error():
|
|||
async def main():
|
||||
"""Test breakpoint in a streaming actor.
|
||||
"""
|
||||
async with tractor.open_nursery() as n:
|
||||
async with tractor.open_nursery(
|
||||
debug_mode=True,
|
||||
loglevel='error',
|
||||
) as n:
|
||||
|
||||
p0 = await n.start_actor('bp_forever', rpc_module_paths=[__name__])
|
||||
p1 = await n.start_actor('name_error', rpc_module_paths=[__name__])
|
||||
p0 = await n.start_actor('bp_forever', enable_modules=[__name__])
|
||||
p1 = await n.start_actor('name_error', enable_modules=[__name__])
|
||||
|
||||
# retreive results
|
||||
stream = await p0.run(breakpoint_forever)
|
||||
|
@ -28,4 +31,4 @@ async def main():
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
tractor.run(main, debug_mode=True, loglevel='error')
|
||||
trio.run(main)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import trio
|
||||
import tractor
|
||||
|
||||
|
||||
|
@ -50,7 +51,9 @@ async def main():
|
|||
└─ python -m tractor._child --uid ('spawn_until_0', 'de918e6d ...)
|
||||
|
||||
"""
|
||||
async with tractor.open_nursery() as n:
|
||||
async with tractor.open_nursery(
|
||||
debug_mode=True,
|
||||
) as n:
|
||||
|
||||
# spawn both actors
|
||||
portal = await n.run_in_actor(
|
||||
|
@ -70,4 +73,4 @@ async def main():
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
tractor.run(main, debug_mode=True)
|
||||
trio.run(main)
|
||||
|
|
Loading…
Reference in New Issue