.
D 2017-11-21T14:17:40.832
J icomment Sharing\sof\sTcl_Obj\sbetween\sdifferent\sthreads\sis\sa\svery\sbad\sidea\s(and\snot\sallowed\sin\sstandard\stcl-core).\r\nAnd\sthis\sis\snot\snecessarily\sa\sthing\sof\satomic\srefCount\sincr/decr\s(resp.\sobject\smodifications)\s-\sdefault\stcl-core\shas\sneither\sa\sGIL,\snor\sa\smultiple\sinternal\srepresentation.\r\n\r\nThis\smeant:\sone\sthread\scan\smake\san\sinteger\sfrom\sthe\sobject,\sanother\smakes\sunicode\sstring\sor\slist\s(with\sanother\sinternal\srepresentation).\r\nMeaning\sthe\sobject\schanges\sinternally\sand\sthis\swill\sproduce\sa\sBOOM\s(segfaults\sand\sco.).\r\n\r\nDon't\sdo\ssuch\skind\sof\ssharing.\sTherefore:\r\n\r\n-\seither\smove\sthe\sobject\scompletely\sto\sanother\sthread\s(take\sover\sthe\sownership);\r\n-\sor\smake\sa\sduplicate\s(using\sTcl_DuplicateObj)\sin\sorder\sto\ssupply\sit\sto\sdifferent\sthreads;\r\n-\sor\screate\seach\stime\sa\snew\sobject\sby\sthe\scommand\sexec\sas\ssuggested\sfrom\s@chw.
J login sebres
J mimetype text/plain
K 17f747a4a4720f8e9797e7933dd43745b73e0e2c
U sebres
Z cccfa9f0488683a7281f1591aab7080e