Native Win32 Threads
The win32process module provides access to the
beginthreadex() function provided by the Microsoft
Visual C++ runtime library. This function allows you to specify a
function as the thread, as well as some custom Win32 setting for the
thread.
There are only a small number of situations when it’s necessary
to use this function in preference to the standard
threading module. The first is when you need
access to the Win32-specific features, such as the security for the
object or flags that indicate the thread should be created in a
suspended mode. Another common situation is when the main thread
requires the Win32 HANDLE of the new thread; this
is not easy using the other Python threading modules (where only the
new thread itself has easy access to this information).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access