Skip to content
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

bpo-40522: Store tstate in a Thread Local Storage #23976

Closed
wants to merge 1 commit into from
Closed

bpo-40522: Store tstate in a Thread Local Storage #23976

wants to merge 1 commit into from

Commits on Dec 28, 2020

  1. bpo-40522: Store tstate in a Thread Local Storage

    If Python is built with GCC or clang, the current interpreter and the
    current Python thread state are now stored in a Thread Local Storage.
    
    Changes:
    
    * configure checks for C11 _Thread_local keyword.
    * Use _Thread_local keyword, GCC and clang __thread extension.
    * Add set_current_tstate() sub-function which sets these two new TLS
      variables (if available).
    * _PyThreadState_Swap() and _PyThreadState_DeleteCurrent() now call
      set_current_tstate().
    * _PyThreadState_GET() and _PyInterpreterState_GET() now use the TLS
      variable if available.
    vstinner committed Dec 28, 2020
    Configuration menu
    Copy the full SHA
    fd097fa View commit details
    Browse the repository at this point in the history