bpo-40521: Make async gen free lists per-interpreter by vstinner · Pull Request #20643 · python/cpython

@vstinner

Each interpreter now has its own asynchronous generator free list:

* Move async gen free lists into PyInterpreterState.
* Free list arrays are now arrays of PyObject*, since
  _PyAsyncGenWrappedValue and PyAsyncGenASend structures are only
  defined in genobject.c.
* Move _PyAsyncGen_MAXFREELIST define to pycore_interp.h
* Add _Py_async_gen_state structure.
* Add tstate parameter to _PyAsyncGen_ClearFreeLists
  and _PyAsyncGen_Fini().