Overview
| Comment: | On Windows, join threads using Win32 HANDLEs. This works by extending the existing WinThread structure with the thread's HANDLE. The lifetime of the WinThread structure is until the thread terminates, for non-joinable threads, or until the thread is joined. For joinable threadsd, the thread's HANDLE remains open; Windows signals the HANDLE when the thread terminates. The thread's return value is transported using the standard Windows mechanism. A new thread-specific variable is introduced so a thread can find its WinThread structure. Initial threads (those not created via Tcl_CreateThread) receive a WinThread lazily, when Tcl_GetCurrentThread is called for the first time. Instead of using the Windows ThreadId as the Tcl threadId, the address of the WinThread is used. The least significant bit of the pointer value is used to distinguish joinable threads from non-joinable threads. (For future use or debugging, the Windows ThreadId is stored in the WinThread structure as well.) generic/tclThreadJoin.c is made redudant by this patch. |
|---|---|
| Timelines: | family | ancestors | descendants | both | windows-thread-join |
| Files: | files | file ages | folders |
| SHA3-256: |
231c699c87686173cbf513a106c35840 |
| User & Date: | mchn1350 on 2023-03-28 18:58:30.431 |
| Other Links: | branch diff | manifest | tags |
Context
|
2023-03-29
| ||
| 09:02 | added copyright note check-in: 7597fe65cc user: konrad.schwarz tags: windows-thread-join | |
|
2023-03-28
| ||
| 18:58 | On Windows, join threads using Win32 HANDLEs. This works by extending the existing WinThread struct... check-in: 231c699c87 user: mchn1350 tags: windows-thread-join | |
|
2023-03-23
| ||
| 07:28 | Merge-mark check-in: 8c96c87de4 user: konrad.schwarz tags: trunk, main | |
Changes
Modified generic/tclInt.h
from [67796696a1]
to [0add33af8e].
[diff]
Deleted generic/tclThreadJoin.c version [b7f92829da].
Modified win/makefile.vc
from [e241732547]
to [3d13af8ddb].
[diff]
Modified win/tclWinThrd.c
from [36fda600c1]
to [2d488019ca].
[diff]