Skip to content
Tcl Source Code Artifact [7140a2eaba]
Login

Artifact [7140a2eaba]

Artifact 7140a2eaba6b021beb055a7a857ab8f69f7bc327:

Ticket change [7140a2eaba] - Ticket [3408824fffffffff|3408824fff] <i>iocmd.tf-24.16 unstable w/ -DPURIFY</i> status still Open with 4 other changes by andreas_kupries on 2011-09-20 00:51:38.
D 2011-09-20T00:51:38
J icomment Alexandre,\sI\sdon't\sremember\sif\sI\sconsidered\syour\salternative.\sNot\ssurprising,\sgiven\sthat\sit\sis\sseven\syears\snow\ssince\sthe\sTIP\shttp://tip.tcl.tk/219.html\swas\smade.\sOn\sre-reading\sthe\ssection\sregarding\sthe\shandling\sof\sthe\sinteraction\sbetween\sRCs\sand\sThreads\sI\smight\shave\shave\sconsidered\sit\sand\sdiscarded,\sgiven\sthat\sI\sprovide\sa\suse\scase\sfor\sthe\scurrent\sdesign\s(Using\sa\spair\sof\sRCs\sfor\sstream-based\sthread\scommunication).\sNot\ssure\showever.\n\n>\sWhen\stransferring\sa\sRC,\sin\saddition\sto\stranferring\sownership\sof\sthe\n>\schannel\sas\susual,\sjust\spass\sthe\s(string)\sname\sof\sthe\shandler\sproc\s"foo".\n>\sThen\smake\sit\sthe\sscript\swriter's\sentire\sresponsibility\sto\spopulate\sthe\sdest\n>\sthread\swith\sthe\snecessary\sprocs\sand\sdata\sfor\s[foo\swrite]\set\sal\sto\sbe\n>\smeaningful\s*there*.\n\nNote\sthat\sthis\smakes\sRCs\s(a)\sspecial\s(case)\swith\sregard\sto\stransfering\sbetween\sthreads.\sWith\sall\sother\schannel\stypes\syou\scan\ssimply\stransfer\sand\sthem\suse\sthem.\sWith\sRCs\syou\snow\shave\sto\sperform\slots\sof\ssetup\sto\smake\sit\swork.\sIn\sthis\smy\sapproach\sfits\sIMVHO\sbetter,\swithout\sspecial\scase\ssetup\son\spart\sof\sthe\sscript\swriter.\sThe\suser\sdoes\snot\shave\sto\scare\sif\sit\sis\san\sRC\swhich\sis\stransfered,\sor\snot.\sThis\sbecomes\sespecially\simportant\swhen\syour\sscript\sis\san\sapplication\susing\schannel\sprovided\sby\ssome\slibrary.\sYou\susually\sdon't\swant\sto\sknow\show\sthe\schannel\sis\simplemented,\sand\sfor\sthis\syou\swould\shave\sto.\n\n>\sI\sknow\sit's\sa\sbit\slate\sto\sreact,\ssorry.\sBut\sit\sseems\sto\sme\sthat\sall\sthe\n>\sspecial-casing\sof\s"thread-transferring\san\sRC"\s(the\shidden\s"thread::send\s+\n>\spseudo-vwait",\splus\sall\sthe\sstuff\sto\sencapsulate\sparameters\sand\sresults\n>\swithout\susing\scross-interp\sobjects,\splus\sthe\sspecific\ssteps\sto\savoid\n>\sdeadlock,\setc...)\swould\svanish\sto\sbe\sreplaced\n\nIOW.\sthe\scomplexity\sand\sspecial\scasing\sis\snot\sreally\sgoing\saway,\sonly\ssimply\sshifted\saround\sand\schanging\sits\snature\sa\sbit\s(setup\swith\syours\svs.\sall\sthe\sinternal\stransfer\smgmt\swith\smine).\n\n>\sby\sexplicit\sscript-level\n>\sstuff\sthat\sis\salready\scovered\sin\sthe\sexisting\simplementation\sof\sthe\n>\sprimitives.\n\n
J login andreas_kupries
J mimetype text/plain
J username andreas_kupries
K 3408824fffffffffffffffffffffffffffffffff
U andreas_kupries
Z 9594440b39edb91387c6d1829d2e4e43