Skip to content
Tcl Source Code Artifact [b06b9af25d]
Login

Artifact [b06b9af25d]

Artifact b06b9af25dcd9246b98960332456759a0b55a470361e09bf3ded33a3dc5081f5:

Ticket change [b06b9af25d] - New ticket [9b63fd201b87c737|9b63fd201b] <i>Fix Thread Join on WIndows</i>. by konrad.schwarz on 2023-02-20 21:20:43.
D 2023-02-20T21:20:43.701
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-plain
J comment The\smanual\spage\sfor\sThread\sstates\s"Windows\scurrently\sdoes\snot\ssupport\sjoinable\sthreads.\sThis\sflag\svalue\sis\stherefore\signored\son\sthis\splatform."\r\n\r\nA\scursory\slook\sat\sthe\simplementation\sshows\sthat\sthread\sjoining\sis\simplemented,\sbut\sin\sa\sround-about\sway,\susing\sthe\sThreadJoin\smodule\sthat\smanages\sa\slist\sof\sjoinable\sthreads.\r\n\r\nThe\sproper\sway\sto\sjoin\sa\sthread\s(i.e.,\ssynchronously\swait\sfor\sa\sthread's\stermination)\sin\sWin32\sis\sto\sWait\s(e.g.,\sWaitForSingleObject())\son\sthe\sthread\shandle,\sreturned\se.g.\sby\sthe\s_beginthreadex()\sfunction.\sThe\sthread's\sexit\sstatus\scan\sbe\sretrieved\swith\sthe\sWin32\sGetExitCodeThread()\sfunction.\sWhile\sthe\sthread\sis\sstill\srunning,\sthis\sfunction\swill\sreturn\sa\sfixed\svalue\s(259),\sbut\sonce\sthe\sthread\shas\sexited\s(when\sthe\sthread's\shandle\shas\sbeen\ssignaled),\sthe\sunadulterated\s(32-bit)\sexit\scode\sis\sreturned\sby\sGetExitCodeThread().\s(The\sMSDN\sdocumentation\sis\spoorly\swritten,\sso\smissing\sthis\sis\squite\sunderstandable.)\r\n\r\nThe\scurrent\simplementation\scloses\sthis\shandle\simmediately,\swhich\sis\sa\smistake.\r\n\r\nIf\syou\slike,\sI\scould\sprobably\sprovide\sa\spatch.
J foundin All
J is_private 0
J login konrad.schwarz
J priority 5\sMedium
J private_contact 80ea11e9d893f90ae1b5d3c2e6c94600b62863e9
J resolution None
J severity Important
J status Open
J submitter konrad.schwarz
J subsystem 80.\sThread\sPackage
J title Fix\sThread\sJoin\son\sWIndows
J type Bug
K 9b63fd201b87c737ef375cd95b5ebbc79629c9ab
U konrad.schwarz
Z a41ad2d0b1a841d3e38b32a22ddf44c6