<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python/thread_nt.h, branch enum-lost-fixes</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-41299: Reduce lag in Windows threading timeouts by using a higher precision time source (GH-26568) (GH-26580)</title>
<updated>2021-06-20T20:12:27+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2021-06-20T20:12:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=8673b77e251e42874501a47b1df86c6bde4fe1d2'/>
<id>8673b77e251e42874501a47b1df86c6bde4fe1d2</id>
<content type='text'>
(cherry picked from commit 449e6f0ef395231e3abe467f910b02d7f075c27f)

Co-authored-by: Ryan Hileman &lt;lunixbochs@gmail.com&gt;

Co-authored-by: Ryan Hileman &lt;lunixbochs@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 449e6f0ef395231e3abe467f910b02d7f075c27f)

Co-authored-by: Ryan Hileman &lt;lunixbochs@gmail.com&gt;

Co-authored-by: Ryan Hileman &lt;lunixbochs@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40268: Rename _PyInterpreterState_GET_UNSAFE() (GH-19509)</title>
<updated>2020-04-14T13:14:01+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-14T13:14:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=81a7be3fa22c983209cc0ffb3537b92b0370f83c'/>
<id>81a7be3fa22c983209cc0ffb3537b92b0370f83c</id>
<content type='text'>
Rename _PyInterpreterState_GET_UNSAFE() to _PyInterpreterState_GET()
for consistency with _PyThreadState_GET() and to have a shorter name
(help to fit into 80 columns).

Add also "assert(tstate != NULL);" to the function.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename _PyInterpreterState_GET_UNSAFE() to _PyInterpreterState_GET()
for consistency with _PyThreadState_GET() and to have a shorter name
(help to fit into 80 columns).

Add also "assert(tstate != NULL);" to the function.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40268: Include explicitly pycore_interp.h (GH-19505)</title>
<updated>2020-04-14T12:26:24+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-14T12:26:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=4a3fe0835310643193ea45529ab0fb45c5f8f2fd'/>
<id>4a3fe0835310643193ea45529ab0fb45c5f8f2fd</id>
<content type='text'>
pycore_pystate.h no longer includes pycore_interp.h:
it's now included explicitly in files accessing PyInterpreterState.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pycore_pystate.h no longer includes pycore_interp.h:
it's now included explicitly in files accessing PyInterpreterState.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-39847: EnterNonRecursiveMutex() uses GetTickCount64() (GH-18780)</title>
<updated>2020-03-11T23:39:02+00:00</updated>
<author>
<name>bobince</name>
<email>and+github@doxdesk.com</email>
</author>
<published>2020-03-11T23:39:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=64838ce7172c7a92183b39b22504b433a33a884d'/>
<id>64838ce7172c7a92183b39b22504b433a33a884d</id>
<content type='text'>
The 32-bit (49-day) TickCount relied on in EnterNonRecursiveMutex can overflow
in the gap between the 'target' time and the 'now' time WaitForSingleObjectEx
returns, causing the loop to think it needs to wait another 49 days. This is
most likely to happen when the machine is hibernated during
WaitForSingleObjectEx.

This makes acquiring a lock/event/etc from the _thread or threading module
appear to never timeout.

Replace with GetTickCount64 - this is OK now Python no longer supports XP which
lacks it, and is in use for time.monotonic().

Co-authored-by: And Clover &lt;and.clover@bromium.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 32-bit (49-day) TickCount relied on in EnterNonRecursiveMutex can overflow
in the gap between the 'target' time and the 'now' time WaitForSingleObjectEx
returns, causing the loop to think it needs to wait another 49 days. This is
most likely to happen when the machine is hibernated during
WaitForSingleObjectEx.

This makes acquiring a lock/event/etc from the _thread or threading module
appear to never timeout.

Replace with GetTickCount64 - this is OK now Python no longer supports XP which
lacks it, and is in use for time.monotonic().

Co-authored-by: And Clover &lt;and.clover@bromium.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36084: Add native thread ID (TID) to threading.Thread (GH-13463)</title>
<updated>2019-05-22T15:43:16+00:00</updated>
<author>
<name>Jake Tesler</name>
<email>jake.tesler@gmail.com</email>
</author>
<published>2019-05-22T15:43:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=b121f63155d8e3c7c42ab6122e36eaf7f5e9f7f5'/>
<id>b121f63155d8e3c7c42ab6122e36eaf7f5e9f7f5</id>
<content type='text'>
Add native thread ID (TID) to threading.Thread objects
(supported platforms: Windows, FreeBSD, Linux, macOS).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add native thread ID (TID) to threading.Thread objects
(supported platforms: Windows, FreeBSD, Linux, macOS).</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "bpo-36084: Add native thread ID to threading.Thread objects (GH-11993)" (GH-13458)</title>
<updated>2019-05-21T10:44:57+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-05-21T10:44:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=d12e75734d46ecde588c5de65e6d64146911d20c'/>
<id>d12e75734d46ecde588c5de65e6d64146911d20c</id>
<content type='text'>
This reverts commit 4959c33d2555b89b494c678d99be81a65ee864b0.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 4959c33d2555b89b494c678d99be81a65ee864b0.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36084: Add native thread ID to threading.Thread objects (GH-11993)</title>
<updated>2019-05-12T17:08:24+00:00</updated>
<author>
<name>Jake Tesler</name>
<email>jake.tesler@gmail.com</email>
</author>
<published>2019-05-12T17:08:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=4959c33d2555b89b494c678d99be81a65ee864b0'/>
<id>4959c33d2555b89b494c678d99be81a65ee864b0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36475: Make PyThread_exit_thread with _Py_NO_RETURN (GH-13068)</title>
<updated>2019-05-04T15:48:05+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-05-04T15:48:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=c664b342a47e4b4650706d07e3e40a295e3a4407'/>
<id>c664b342a47e4b4650706d07e3e40a295e3a4407</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-33316: PyThread_release_lock always fails (GH-6541)</title>
<updated>2019-02-02T16:22:55+00:00</updated>
<author>
<name>native-api</name>
<email>ivan_pozdeev@mail.ru</email>
</author>
<published>2019-02-02T16:22:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=05e922136a3286893bd489a8f2ecfa0dba4da368'/>
<id>05e922136a3286893bd489a8f2ecfa0dba4da368</id>
<content type='text'>
Use correct interpretation of return value from APIs.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use correct interpretation of return value from APIs.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266)</title>
<updated>2018-11-01T00:51:40+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-11-01T00:51:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=50b48572d9a90c5bb36e2bef6179548ea927a35a'/>
<id>50b48572d9a90c5bb36e2bef6179548ea927a35a</id>
<content type='text'>
If Py_BUILD_CORE is defined, the PyThreadState_GET() macro access
_PyRuntime which comes from the internal pycore_state.h header.
Public headers must not require internal headers.

Move PyThreadState_GET() and _PyInterpreterState_GET_UNSAFE() from
Include/pystate.h to Include/internal/pycore_state.h, and rename
PyThreadState_GET() to _PyThreadState_GET() there.

The PyThreadState_GET() macro of pystate.h is now redefined when
pycore_state.h is included, to use the fast _PyThreadState_GET().

Changes:

* Add _PyThreadState_GET() macro
* Replace "PyThreadState_GET()-&gt;interp" with
  _PyInterpreterState_GET_UNSAFE()
* Replace PyThreadState_GET() with _PyThreadState_GET() in internal C
  files (compiled with Py_BUILD_CORE defined), but keep
  PyThreadState_GET() in the public header files.
* _testcapimodule.c: replace PyThreadState_GET() with
  PyThreadState_Get(); the module is not compiled with Py_BUILD_CORE
  defined.
* pycore_state.h now requires Py_BUILD_CORE to be defined.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If Py_BUILD_CORE is defined, the PyThreadState_GET() macro access
_PyRuntime which comes from the internal pycore_state.h header.
Public headers must not require internal headers.

Move PyThreadState_GET() and _PyInterpreterState_GET_UNSAFE() from
Include/pystate.h to Include/internal/pycore_state.h, and rename
PyThreadState_GET() to _PyThreadState_GET() there.

The PyThreadState_GET() macro of pystate.h is now redefined when
pycore_state.h is included, to use the fast _PyThreadState_GET().

Changes:

* Add _PyThreadState_GET() macro
* Replace "PyThreadState_GET()-&gt;interp" with
  _PyInterpreterState_GET_UNSAFE()
* Replace PyThreadState_GET() with _PyThreadState_GET() in internal C
  files (compiled with Py_BUILD_CORE defined), but keep
  PyThreadState_GET() in the public header files.
* _testcapimodule.c: replace PyThreadState_GET() with
  PyThreadState_Get(); the module is not compiled with Py_BUILD_CORE
  defined.
* pycore_state.h now requires Py_BUILD_CORE to be defined.</pre>
</div>
</content>
</entry>
</feed>
