Skip to content
Tcl Source Code Artifact [841375291c]
Login

Artifact [841375291c]

Artifact 841375291c9054ada0d8b359e0abea3bdbaff363:

Ticket change [841375291c] - Ticket [3301634fffffffff|3301634fff] <i>Thread release crash</i> status still Open with 4 other changes by vasiljevic on 2011-08-18 22:59:59.
D 2011-08-18T22:59:59
J icomment Releasing\sthe\smain\sthread\sis\ssyntactically\spossible\nand\swrong.\sActually\sreleasing\sthe\s'current'\sthread\nie.\sone\scalling\sthe\sthread::release\sshould\sbe\sdisabled\nor\sjust\sa\sno-op'ed.\sI\snever\sthought\sof\sthat\sas\sthis\sis\s\nrarely\spractically\sdone.\n\nReleasing\s(i.e.\sletting\sit\sdie\saway)\sany\sthread\sis\salways\nconnected\swith\svarious\scleanups\sthat\smay\sgo\sastray\nin\scertain\ssituations.\sFor\sexample,\syou\slock\sa\smutex\sin\na\sthread\sand\sthen\srelease\sthe\sthread.\sMoreover,\sthe\s\nTcl\slib\swas\sinitially\snot\sdesiged\sfor\sthread\ssafety.\sIt\sis\nadded\ssome\syears\slater.\sSo\sthe\sentire\scleanup/finalize\nmachinery\sis\snot\svery\sthread-friendly\sand\sstill\sassumes\na\s"main"\sthread\s(the\sone\sthat\sstarted\sthe\sprogram)\sis\nalways\sarround.\s\n\nSo.,,\syou\snever\sexit\sa\s"main"\sthread\s(whichever\sthat\sis)\nand\sI\swill\sadd\sa\sblock\sthat\swill\seffectively\sno-op\sthe\nrelease\sof\sthe\s'self'\si.e\scurrent\sthread\s(as\sexplained\sabove).\n\nCheers\nZoran\s\n
J login vasiljevic
J mimetype text/plain
J username vasiljevic
K 3301634fffffffffffffffffffffffffffffffff
U vasiljevic
Z 3709e21f769785b026f85c84f7775349