<i>Nested mutexes following TIP 509</i> status still Open with 3 other changes
by
.
D 2025-08-22T17:41:21.179
J comment As\sreported\sby\sChristian\sand\sSergey,\snested\smutexes\sfollowing\sTIP\s509\sare\sbroken.\r\n\r\nChristian\shas\sprovided\sthe\sfix\sby\sa\score\slist\smessage\stitled\sRe:\s"[TCLCORE]\sReview\sof\sbranch\sbug-87b69745be"\s2025-08-13\s17:50\sUTC.\r\n\r\nThis\sfix\sis\snow\sin\scommit\s[cdc8e88f7b],\swhich\sstarts\sbranch\s[893f8cc5-tip509-nested-mutex].\r\n\r\n<h2>Here\sare\sadditional\sinformations\sgiven\sin\sthe\sthread\sby\sChristian</h2>\r\n\r\nFor\sthe\srecord:\sthe\sWin32\simplementation\sof\swait\son\scondition\sseems\r\nbroken,\stoo.\sDue\sto\sWin32\scritical\ssections\ssupporting\snesting,\sthe\r\nlogical\sunlock\sbefore\sthe\swait\son\scondition\s*must*\sleave\sthe\scritical\r\nsection\sas\smany\stimes\sas\sit\swas\sentered\sand\srestore\sthis\safterwards.\r\nOtherwise\sthe\smutex\sis\slocked\sduring\sthe\swait,\sand\sthat\sviolates\sthe\r\ncontract.\r\n\r\nNote,\sthat\sthe\sused\swall\sclock\shas\sissues,\sand\seventually\sTIP\s509:\r\n\r\nNow\swe\shave\sthe\r\n"wait\son\scondition"\soperation,\swhich\sin\sthe\sPOSIX\ssense\scan\sbe\stimely\r\nlimited\sto\san\sabsolute\spoint\sof\stime,\swhen\sit\sis\sto\stime\sout.\sWhy\sthe\r\nheck\syou\smight\sask?\sDude,\sdue\sto\sthe\sspuriously\swakeupery,\swhen\syou've\r\nraced\sand\swon\snot.\sThis\sis\snot\sreflected\sin\sany\scurrent\simplementation\r\nof\sthe\sTcl\swrappers.\sAnd\sthe\sfine\sproblem\sin\sPOSIX\swas,\sthat\sabsolute\r\nmeant\swall\sclock\sin\sthe\searly\sdays.\sUntil\sPOSIX\scondition\svariables\r\nlearned\sabout\sCLOCK_MONOTONIC.\sWhich\sIMO\sis\sthe\sonly\susable\sway\sto\r\noperate\s"waiting\son\scondition".\sSince\swall\sclockery\smight\sdo\sthings\r\nunder\sthe\shood\sand\sout\sof\scontrol.\r\n\r\n<h2>Ashok</h2>\r\nI\sagree\syour\sfix,\salong\swith\sthe\ssystem\sencoding\sMT\sissue\sSergey\slogged,\sis\r\nsomething\sthat\sneeds\sattention.\sWhether\sthat\smeans\seliminating\sthe\srecursive\r\nmutex\sor\sfixing\sthe\scondition\svariable\scode\sremains\sto\sbe\sseen.\sWhile\sI\sam\r\nwary\sof\sthe\sformer\sin\sa\snon-major\srelease,\ssince\sthe\sAPI\sis\snew\sin\sTcl\s9,\sit\r\nis\slikely\sfew\speople\swill\sbe\susing\sit\sso\sreverting\smay\sbe\sa\spossibility.\sAs\r\nto\sthe\stime\sframe,\shopefully\sin\sa\scouple\sof\sweeks\sunless\ssomeone\sgets\sto\sit\r\nsooner.
J login apnadkarni
J mimetype text/plain
K 893f8cc5db3ba8bd6bed80ce89a0a75c6088a37c
U apnadkarni
Z 419854526397e06ee26d684efd26244c