top | item 45113108

(no title)

VonTum | 6 months ago

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...

discuss

order

No comments yet.