Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In [3], isn't there a pretty trivial exploit to get a "background task reads from closed file" again?

  async with mk_nursery() as nursery:
    with os.fopen(...) as file:
      nursery.start_soon(lambda: file.read())
The with block may have ended before the task starts...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: