A simple wrapper for kqueue VNODE (for now) functionality to be asyncio compatible.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- 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())
|