Skip to content
Tcl Source Code Artifact [7b19a96058]
Login

Artifact [7b19a96058]

Artifact 7b19a96058475a8db17c25aa62db2057afe63cd4:

Ticket change [7b19a96058] - New ticket [1932639fffffffff|1932639fff] <i>Mixed sync/async [fcopy -command]</i>. by ferrieux on 2008-04-02 20:49:20.
D 2008-04-02T20:49:20
J assignee andreas_kupries
J cmimetype text/plain
J comment In\sthe\scourse\sof\sthe\sinvestigation\sfor\s[Bug\s780533],\sI\nstumbled\supon\sthe\sfollowing\sweirdness\sof\sthe\simplementation\s(quoting\nmyself\ssince\snobody\sanswered\sthat\spart\s;-):\n\n>\sA\sside-note\sabout\sthe\simplementation:\sif\sI\sread\scorrectly,\sthe\n>\sasynchronous\s[fcopy]\sdoes\sits\sfirst\schunk\ssynchronously\s(in\n>\snon-blocking\smode).\sThis\sis\sa\sbit\sunusual\sin\sevent-driven\sstyle:\ssetup\n>\sprocedures\sjust\sset\sthings\sup,\sthe\sreal\swork\sbeing\sdone\sonly\sfrom\n>\swithin\s[vwait].\sWhile\shere,\sa\ssmall\sbit\sof\sthe\scopy\smay\sbe\sdone\n>\simmediately,\seven\sif\sthe\sprogram\sdoesn't\scall\svwait\sbefore\ssome\n>\stime...\n>\sWhy\sis\sit\sdone\sthis\sway\s?\sTo\sfactor\scode\sbetween\ssync\sand\sasync\scases\s?\n>\sDo\swe\swant\sit\sto\sbe\sthis\sway\s?\sCould\sit\sexplain\snasty\scontext-dependent\sbugs\s?\n\nNow,\sI'd\slike\sto\spour\sin\sadditional\sevidence\sthat\sthis\sis\sjust\splain\swrong.\n\nThe\sidea\sis\sthat,\ssince\s[fcopy\s-command]\sis\sboth\ssync\sand\sasync,\san\nerror\sraised\sin\sthe\scallback\smay\spop\sout\seither\ssynchronously\s(subject\nto\sa\scatch\son\s[fcopy]\sitslef)\sor\sasynchronously\s(subject\sto\sbgerror):\n\n1)\sFast\stransfer\s(2\sbytes):\n\n\s%\sproc\splop\sargs\s{puts\sstderr\sPLOP:$args;set\s::done\s1;error\syo}\n\s%\sset\sf\s[open\sha\sr]\n\s%\sset\sn\s[open\snul:\sw]\n\s%\sfconfigure\s$f\s-translation\sbinary\n\s%\sfconfigure\s$n\s-translation\sbinary\n\s%\sfcopy\s$f\s$n\s-size\s2\s-command\splop\nPLOP:2\n\n\s%\sputs\s$::errorInfo\n\n\s\s\swhile\sexecuting\n"fcopy\s$f\s$n\s-size\s2\s-command\splop"\n\n(notice\salso\sthat\sthe\serror\sstatus\sis\slost,\swhile\serrorInfo\sis\sOK.\sYet\nanother\sbug.)\n\n2)\sSlow\stransfer\s(20000\sbytes)\n#\sdo\sthe\ssame\swith\s-size\s20000\sand\sa\sfile\slonger\sthan\sthat\n\s-\sfcopy\sreturns\scontrol\swithout\sPLOP\n\s-\syou\sneed\sto\senter\sa\svwait\sto\sget\sthe\sPLOP\n\n\s(yuck\s--\sthe\serror\sis\slost\sagain;\sbut\sif\sit\swasn't,\sit'd\sbe\sa\sbgerror)\n\nQuestions:\n\n\s-\sIs\sthe\sdisabling\sof\serrors\sin\sthe\scallback\sintentional,\sin\sorder\sto\nhide\sthat\scatch/bgerror\sdichotomy\s?\n\n\s-\sIf\snot,\swould\syou\saccept\sa\spatch\sstraightening\sboth\sissues\ssimultaneously\sby:\n\n\s\s\s\s\s\s-\sremoving\sthe\ssync\spart\sof\s[fcopy\s-async]\n\s\s\s\s\s\s-\sre-enabling\serrors\sin\sthe\scallback\s(hell\sif\sI\sknow\show\sto\sdo\nthis\sright\snow)\n\nThis\sway,\sboth\sexamples\sabove\swould\send\sup\sin\sbgerror.\n(Needless\sto\ssay,\sI\svolunteer\sfor\sthe\spatch)\n
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter ferrieux
J subsystem 24.\sChannel\sCommands
J title Mixed\ssync/async\s[fcopy\s-command]
J type Bug
K 1932639fffffffffffffffffffffffffffffffff
U ferrieux
Z 999a244006c0c95581af549c4ffc1b07