Skip to content
Tcl Source Code Artifact [a1995b5dbe]
Login

Artifact [a1995b5dbe]

Artifact a1995b5dbe8d8b4fc6b1addb140c546c8a56894a:

Ticket change [a1995b5dbe] - New ticket [770053ffffffffff|770053ffff] <i>Tcl_CreateThread breaks notifier thread refcount</i>. by vasiljevic on 2003-07-12 08:30:50.
D 2003-07-12T08:30:50
J assignee hobbs
J cmimetype text/plain
J comment Tcl\sAPI\sis\squite\sunsymetrical\swhen\screating\sthreads\s\nwithout\sembedded\sinterpreter.\s\n\nWhat\shapenns\sis\sthat\swhen\sone\suses\sTcl_CreateThread\nAPI\scall\sto\screate\snew\sthread\sand\sTcl_ExitThread\sto\ncleanup\safter\sitself\swhen\sthe\sthread\sexits,\sthe\snotifier\nthread\sreference\scounter\sis\sdecremented\sone\stime\stoo\nmuch.\sThis\seventually\stears-down\sthe\snotifier\sthread\nand\sthe\sinter-thread\scommunication\sbetwenn\sthreads\nbecomes\simpossible.\nIf,\showever,\sa\snewly\screated\sthread\scalls\sthe\nTcl_CreateInterp,\sthe\sreference\scount\sis\sok.\n\nThe\sproblem\slies\sin\sthe\sfact\sthat\sTcl_CreateInterp\ncalls,\sas\spart\sof\sits\sprocessing,\sTcl_InitNotifier.\nThis\scall\sbumps\sthe\srefcount\sof\sthe\snotifier\sthread.\nThe\sTcl_ExitThread\scalls\sTcl_FinalizeNotifier\sand\nthis\sdecrements\sthe\srefcount.\sIn\sthis\scase,\sall\sis\sok.\nBut,\sthe\sTcl_CreateThread\s*does\snot*\scall\sthe\s\nTcl_InitNotifier,\swhich\sthen\sresults\sin\swrong\srefcount\nof\sthe\snotifier\sthread\swhen\sTcl_ExitThread\sis\scalled.\n\nI'm\sassigning\sthis\sto\sJeff\ssince\sI\sdo\snot\sknow\swho\nis\smaintaining\sthe\sthread\sAPI\ssubsytem.
J foundin obsolete:\s8.4.3
J priority 6
J resolution None
J status Open
J submitter vasiljevic
J subsystem 49.\sThreading
J title Tcl_CreateThread\sbreaks\snotifier\sthread\srefcount
J type Bug
K 770053ffffffffffffffffffffffffffffffffff
U vasiljevic
Z e89dff6efab0fdbdaac668333699824b