async with aiofiles.open(fileName) as f:
i = 0
async for line in f:
i += 1
print(i, len(line))
Memory usage grows like there's no tomorrow.
Using explicit executor and close it after every usage seems to solve this problem. But I don't know why it works. What happens to those run_in_executor coroutine data?
Memory usage grows like there's no tomorrow.
Using explicit executor and close it after every usage seems to solve this problem. But I don't know why it works. What happens to those
run_in_executor
coroutine data?