Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-103323: Get the "Current" Thread State from a Thread-Local Variable #103324

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
Prev Previous commit
Next Next commit
Add HAVE_THREAD_LOCAL.
  • Loading branch information
ericsnowcurrently committed Apr 7, 2023
commit d4136d28419d17316492b6c351ee021b600e8d3b
4 changes: 4 additions & 0 deletions 4 Include/pyport.h
Original file line number Diff line number Diff line change
Expand Up @@ -667,11 +667,15 @@ extern char * _getpty(int *, int, mode_t, int);
# ifndef thread_local
# if __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_THREADS__)
# define thread_local _Thread_local
# define HAVE_THREAD_LOCAL 1
# elif defined(_MSC_VER) /* AKA NT_THREADS */
# define thread_local __declspec(thread)
# define HAVE_THREAD_LOCAL 1
# elif defined(__GNUC__) /* includes clang */
# define thread_local __thread
# define HAVE_THREAD_LOCAL 1
# else
// XXX Fall back to the PyThread_tss_*() API.
# error "no supported thread-local variable storage classifier"
# endif
# endif
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.