diff --git a/misc/kqdir.py b/misc/kqdir.py new file mode 100644 index 0000000..9c938d6 --- /dev/null +++ b/misc/kqdir.py @@ -0,0 +1,14 @@ +import aiokq +import asyncio +import os + +fd = os.open('.', os.O_RDONLY) + +async def foo(): + async with aiokq.watch_file(fd) as wf: + print('a') + await wf() + print('b') + +loop = asyncio.get_event_loop() +loop.run_until_complete(foo())