forked from goodboy/tractor
1
0
Fork 0

WIP debugging test script

debug_tests
Tyler Goodlet 2020-07-23 13:34:03 -04:00
parent b06d4b023e
commit 1d1c881fd7
1 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,28 @@
import tractor
import trio
async def bubble():
print('IN BUBBLE')
await trio.sleep(.1)
await tractor.breakpoint()
async def bail():
getattr(doggy)
async def main():
"""The main ``tractor`` routine.
"""
async with tractor.open_nursery() as n:
# portal = await n.run_in_actor('future_self', bubble)
portal = await n.run_in_actor('future_self', bail)
# The ``async with`` will unblock here since the 'some_linguist'
# actor has completed its main task ``cellar_door``.
if __name__ == '__main__':
tractor.run(main, loglevel='info', debug_mode=True)