Skip to content
Tcl Source Code History Of Ticket 9b63fd201b
Login

History Of Ticket 9b63fd201b

Artifacts Associated With Ticket 9b63fd201b

  1. Ticket change [b06b9af25d] (rid 208937) by konrad.schwarz on 2023-02-20 21:20:43:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-plain"
    4. comment initialized to:
      The manual page for Thread states "Windows currently does not support joinable threads. This flag value is therefore ignored on this platform."
      
      A cursory look at the implementation shows that thread joining is implemented, but in a round-about way, using the ThreadJoin module that manages a list of joinable threads.
      
      The proper way to join a thread (i.e., synchronously wait for a thread's termination) in Win32 is to Wait (e.g., WaitForSingleObject()) on the thread handle, returned e.g. by the _beginthreadex() function. The thread's exit status can be retrieved with the Win32 GetExitCodeThread() function. While the thread is still running, this function will return a fixed value (259), but once the thread has exited (when the thread's handle has been signaled), the unadulterated (32-bit) exit code is returned by GetExitCodeThread(). (The MSDN documentation is poorly written, so missing this is quite understandable.)
      
      The current implementation closes this handle immediately, which is a mistake.
      
      If you like, I could probably provide a patch.
      
    5. foundin initialized to: "All"
    6. is_private initialized to: "0"
    7. login: "konrad.schwarz"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "80ea11e9d893f90ae1b5d3c2e6c94600b62863e9"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "konrad.schwarz"
    14. subsystem initialized to: "80. Thread Package"
    15. title initialized to: "Fix Thread Join on WIndows"
    16. type initialized to: "Bug"
  2. Ticket change [939dd41325] (rid 208948) by jan.nijtmans on 2023-02-21 07:35:48:

    1. icomment:
      Is this ticket meant for the Thread package or for Tcl itself? See: [https://core.tcl-lang.org/thread].
      
      Whatever it's meant for, yes, a patch would help a lot!
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  3. Add attachment "thread_join_win32.patch" [6b5a40ba1f] (rid 211148) by konrad.schwarz on 2023-03-28 19:08:41.

  4. Ticket change [e3d087bdf8] (rid 211149) by konrad.schwarz on 2023-03-28 19:09:48:

    1. icomment: "Patch has been added."
    2. login: "konrad.schwarz"
    3. mimetype: "text/plain"
    4. username: "Konrad Schwarz"
  5. Ticket change [f53bf0f33b] (rid 211163) by konrad.schwarz on 2023-03-29 08:59:56:

    1. icomment:
      Sorry, I misunderstood the fossil patch mechanism.  I was expected it to include commits, but in fact it includes only un-committed changes.
      
      How do I communicate my changes back to you? Can I push to the main Tcl repo?
      
    2. login: "konrad.schwarz"
    3. mimetype: "text/plain"