Skip to content
Tcl Source Code Artifact [78fe1ee912]
Login

Artifact [78fe1ee912]

Artifact 78fe1ee9123bea1e087241ec4d46b40863260e24:

Ticket change [78fe1ee912] - Ticket [35a839cba8a4e6bb|35a839cba8] <i>Can not reinitialize Tcl after Tcl_Finalize()</i> status still Open with 3 other changes by ferrieux on 2014-08-26 13:23:57.
D 2014-08-26T13:23:57.330
J icomment I\sdo\sconfirm\sthat\sthe\snet\sresult\sof\sthe\s"Bug\s2001201\sexit\sreform"\sis\sto\savoid\scalling\sFinalize\sin\sthe\snormal\sexit\spath;\sbut\sthe\sreason\sis\smore\ssubtle\sthan\s"it's\sbroken\sand\sI\scan't\sbe\sbothered\sto\sfix\sit".\sRather,\sit\sis\sthe\ssum\sof\stwo\sthings:\r\n\r\n\s-\sexit()\sis\sreally\sthe\sfastest\sway\sof\sgetting\sout,\sbecause\sit\simplies\s(a)\sbulk\smemory\sfreeing\s(the\smappings\sjust\sdisappear,\swithout\s\scrawling\swhatever\sthe\suserland\sthinks\sits\sheap\scontains)\sand\s(b)\sbulletproof\srelease\sof\skernel\sresources\s(like\sfds,\smutexes,\setc).\sThe\sOOP\shabit\sof\srecursively\scalling\sthe\sDestructor\sof\severy\ssingle\sliving\sform\sin\sthe\suniverse\sis\sa\ssuboptimal\sway\sof\sexiting\swhen\sthere\sis\sno\scompulsory\sapp-level\scleanup\sto\sdo.\r\n\r\n\s-\smultithread\sfinalization\scan\slead\sto\sdeadlocks,\sand\sthere\sis\sno\sway\sto\savoid\sthem\swith\scertainty,\sshort\sof\sexit()\sitself.\r\n\r\nNote\sthe\s"reform"\sonly\ssays\sthat\s[exit]\swill\sshun\sFinalize()\s(unless\sthe\sTCL_FINALIZE_ON_EXIT\senv\svar\sis\sset\sto\s1);\sit\ssays\snothing\sabout\swhat\sembedders\sdo.\sAnd\sit\sdid\snot\ssabotage\sthe\sFinalize()\sfunction\sitself\s;)
J login ferrieux
J mimetype text/plain
K 35a839cba8a4e6bbdcd9567f958d56076fe5bd0f
U ferrieux
Z 9ec3d3a642f18fb0c432ee4d8acc331c