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.
 
 

15 lines
231 B

  1. import aiokq
  2. import asyncio
  3. import os
  4. fd = os.open('.', os.O_RDONLY)
  5. async def foo():
  6. async with aiokq.watch_file(fd) as wf:
  7. print('a')
  8. await wf()
  9. print('b')
  10. loop = asyncio.get_event_loop()
  11. loop.run_until_complete(foo())