5 ms·
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(.
by VonTum 1y 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...