Skip to content

bpo-40521: Make async gen free lists per-interpreter #20643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2020
Merged

bpo-40521: Make async gen free lists per-interpreter #20643

merged 1 commit into from
Jun 5, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 5, 2020

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

https://bugs.python.org/issue40521

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().
@vstinner vstinner requested review from 1st1 and pablogsal as code owners June 5, 2020 00:10
@vstinner vstinner merged commit 78a02c2 into python:master Jun 5, 2020
@vstinner vstinner deleted the async_gen_free_list branch June 5, 2020 00:34
arun-mani-j pushed a commit to arun-mani-j/cpython that referenced this pull request Jul 21, 2020
Each interpreter now has its own asynchronous generator free lists:

* Move async gen free lists into PyInterpreterState.
* Move _PyAsyncGen_MAXFREELIST define to pycore_interp.h
* Add _Py_async_gen_state structure.
* Add tstate parameter to _PyAsyncGen_ClearFreeLists
  and _PyAsyncGen_Fini().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants