asyncio._SelectorSocketTransport: help garbage collector

rkojedzinszky · GitHub

Feature or enhancement

Debugging an asyncio application I've found that many _SelectorSocketTransport objects end up listed in gc.garbage instead of being released as soon as possible.

Pitch

We could release resources as soon as possible, and avoid this task to be done by gc.

Linked PRs

gh-100348: asyncio._SelectorSocketTransport: free cyclic reference on close() #100349