| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,9 +50,8 @@ | |||
| 50 | 50 | _HAVE_THREAD_NATIVE_ID = False | |
| 51 | 51 | try: | |
| 52 | 52 | _set_name = _thread.set_name | |
| 53 | - _HAVE_SET_NAME = True | ||
| 54 | 53 | except AttributeError: | |
| 55 | - _HAVE_SET_NAME = False | ||
| 54 | + _set_name = None | ||
| 56 | 55 | ThreadError = _thread.error | |
| 57 | 56 | try: | |
| 58 | 57 | _CRLock = _thread.RLock | |
@@ -1032,7 +1031,7 @@ def _bootstrap_inner(self): | |||
| 1032 | 1031 | self._set_ident() | |
| 1033 | 1032 | if _HAVE_THREAD_NATIVE_ID: | |
| 1034 | 1033 | self._set_native_id() | |
| 1035 | - if _HAVE_SET_NAME and self._name: | ||
| 1034 | + if _set_name is not None and self._name: | ||
| 1036 | 1035 | _set_name(self._name) | |
| 1037 | 1036 | self._started.set() | |
| 1038 | 1037 | with _active_limbo_lock: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2364,7 +2364,7 @@ Internal only. Return a non-zero integer that uniquely identifies the main threa | |||
| 2364 | 2364 | of the main interpreter."); | |
| 2365 | 2365 | ||
| 2366 | 2366 | ||
| 2367 | - #ifdef HAVE_PTHREAD_SETNAME_NP | ||
| 2367 | + #ifdef HAVE_PTHREAD_GETNAME_NP | ||
| 2368 | 2368 | /*[clinic input] | |
| 2369 | 2369 | _thread._get_name | |
| 2370 | 2370 | ||
@@ -2387,7 +2387,7 @@ _thread__get_name_impl(PyObject *module) | |||
| 2387 | 2387 | name[size] = 0; | |
| 2388 | 2388 | return PyUnicode_DecodeFSDefault(name); | |
| 2389 | 2389 | } | |
| 2390 | - #endif // HAVE_PTHREAD_SETNAME_NP | ||
| 2390 | + #endif // HAVE_PTHREAD_GETNAME_NP | ||
| 2391 | 2391 | ||
| 2392 | 2392 | ||
| 2393 | 2393 | #ifdef HAVE_PTHREAD_SETNAME_NP | |
| Back | FazBrowse Home | New Git URL |
0 commit comments