Skip to content
Tcl Source Code Artifact [2359aa3691]
Login

Artifact [2359aa3691]

Artifact 2359aa3691cfed38b5802190f33ce45d05600257:

Ticket change [2359aa3691] - New ticket [3096275fffffffff|3096275fff] <i>Sync fcopy buffers input</i>. by ferrieux on 2010-10-27 08:32:25.
D 2010-10-27T08:32:25
J assignee andreas_kupries
J cmimetype text/plain
J comment The\sfollowing\sscript:\n\n\sfconfigure\sstdin\s-translation\sbinary\s-blocking\s0\n\sfconfigure\sstdout\s-buffering\snone\s-translation\sbinary\n\sfcopy\sstdin\sstdout\n\nwhen\sfed\sby\styping\slines\sto\sstdin,\swill\snot\soutput\sanything\suntil\seither\s4k\shave\sbeen\styped\sor\seof,\sdespite\sthe\snonblocking\smode\son\sstdin.\nThe\ssame\susing\san\sasync\sfcopy,\swill\swork\sin\sa\smore\sresponsive\smanner:\n\n\sfcopy\sstdin\sstdout\s-command\sdone\n\svwait\sforever\n\nThis\sis\sa\sconsequence\sof\sthe\sfollowing\scredo,\sin\sa\scomment\sin\sTclCopyChannel:\n\n\s\s\s\s/*\n\s\s\s\s\s*\sSet\sup\sthe\sblocking\smode\sappropriately.\sBackground\scopies\sneed\n\s\s\s\s\s*\snon-blocking\schannels.\sForeground\scopies\sneed\sblocking\schannels.\sIf\n\s\s\s\s\s*\sthere\sis\san\serror,\srestore\sthe\sold\sblocking\smode.\n\s\s\s\s\s*/\n\nAs\sa\sconsequence,\swhile\sGetInput\shappily\sreturns\sshort\sreads,\sDoRead\sinsists\son\sfilling\sup\sits\s4k\sbuffer.\n\nThat\sis,\ssync\sfcopy\swill\snever\spass\sshort\sreads\son\sto\sthe\soutput\schannel.\sHence,\ssync\sfcopy\sis\snot\sadapted\sto\slive\sstreams,\swhile\sasync\sfcopy\sis.\n\nThis\sit\sat\sleast\ssurprising\sfor\sthe\sdeveloper,\ssince\sthe\ssync/async\sfcopy\sdecision\sis\srather\sbased\son\sexternal\sconsiderations\slike\s"do\sI\sneed\sto\sinterleave\sit\swith\sother\sIO"\sor\s"do\sI\sneed\sto\skeep\sa\sGUI\sresponsive".\sThe\sfact\sthat\schosing\ssync\simplies\sbuffering\sby\s4k\sis\snowhere\sin\sthe\sdocs.\n\nLow\sprio\sbecause\sit's\sa\sDay-1\sissue\s:/\n
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter ferrieux
J subsystem 25.\sChannel\sSystem
J title Sync\sfcopy\sbuffers\sinput
J type Bug
K 3096275fffffffffffffffffffffffffffffffff
U ferrieux
Z e2f921719a436b063576bd75767242c6