<i>write-only nonblocking refchan and Tcl internal buffers</i> status still Open with 3 other changes
by
.
D 2024-04-02T10:26:35.840
J icomment TLDR:\s\sIf\syou\scan\sfind\san\sacceptable\sway\sto\seliminate\sthat\stimer,\sthen\r\nI'm\sall\sfor\sit.\s\sJust\sdon't\srevert\sthis\schange\swholesale.\s\sThe\ssituation\r\ncalls\sfor\smore\seffort\sthan\sthat.\r\n\r\nNext...\r\n\r\nI\sunderstand\sall\sof\sthe\sprinciples\sthat\syou've\sexplained,\sand\sin\stheory\r\nagree.\s\sThe\sthing\sis\sthat\sTcl\sprovides\sa\svariety\sof\sknobs\sto\sachieve\r\nvarious\sbehaviours,\sand\salso\sprovides\srefchans,\swhich\smust\sfunction\seven\r\nin\sthe\sabsence\sof\sexternal\sstate\schanges\sthat\stypical\schannels\shave.\r\nYou're\sarguing\sfrom\sa\smatter\sor\sprinciple,\sbut\sthe\strick\sis\sto\r\naccommodate\sall\sof\sthese\sbehaviours\sand\scontexts\sin\spractice.\s\sIf\syou\r\ncan\seliminate\sthat\stimer\swithout\sbreaking\sanything,\sthan\splease\sdo!\r\nWhat\sI'm\sarguing\sagainst\sis\sjust\sreverting\sthis\schange\swithout\sproviding\r\nany\sother\sfix,\sand\swithout\seven\sproviding\san\sexample\sof\ssomething\sthat\r\nis\sbroken\sand\scan't\sbe\sfixed\sby\sany\sof\sthe\sexisting\sknobs.\s\sI\shave\sshown\r\nhow\sto\sasynchronously\sconnected\sby\susing\s<code>[socket\s-async]</code>\r\nand\snot\sconfiguring\sthe\schannel\sas\snonblocking\suntil\sthe\s"connected"\r\nevent\sis\shandled.\sNo\sone\shas\smade\stest\sio-14.11.0\sreliably\sfail\sin\sthe\r\nerror\scase,\sso\sit's\scurrently\snot\sa\smeaningful\stest.\s\sThe\sidle\squeue\r\nstarvation\syou\smentioned\swas\seasily\sfixable\sseparately.\s\sUntil\sthere\sis\r\na\sconcrete\sexample\sshowing\ssomething\sthat\sneeds\sfixing,\sthe\sbest\sway\sto\r\ncontinue\sis\sfor\sany\sinterested\sparty\sto\smake\simprovements\sto\sexisting\r\ncode,\sand\snot\sto\srevert\sthe\schange\sthat\sfixed\sthis\sissue.\r\n\r\nI'm\snot\sfond\sof\sthat\stimer\seither,\sand\sI've\seven\sprovided\san\sidea\sfor\r\ntaking\ssteps\stowards\seliminating\sit.\s\sPerhaps\sthat\sgot\slost\sin\sthe\r\nnoise:\s\sThe\stimer\scan\sbe\sconstrained\sto\scases\swhere\sa\swrite\s(perhaps\r\nonly\sto\sa\sbuffer)\shas\salready\soccurred\sand\san\sunfilled\sbuffer\sexists.\r\nThis\swould\smove\sthings\sin\sthe\sdirection\syou're\sadvocating\sby\sonly\r\nemploying\sthe\stimer\swhen\sit\sis\sreally\snecessary.\s\sIf\syou\shave\stime,\syou\r\ncould\sdo\sthat\swork,\sor\sI'll\sdo\sit\swhen\sI\shave\stime,\sor\smaybe\ssomeone\r\nwill\scome\sup\swith\sa\sway\sto\seliminate\sthe\stimer\sentirely.\s\sLet's\swork\son\r\nit,\sand\snot\sjust\srevert\schanges\sthat\shave\sbeen\sin\splace\sfor\sfour\syears\r\nalready,\sand\sthat\sdo\ssolve\sissues\slike\sthe\sone\sdescribed\sin\sthe\scurrent\r\nreport.\r\n\r\nAll\sa\srefchan\sshould\shave\sto\sdo\sis\suse\s[chan\spostevent]\sto\sindicate\sthat\r\nit\sis\swritable.\s\sYes,\srefchans\scurrently\sset\sup\stimers\skeep\sthose\r\nwritable\sevents\sposting,\sbut\sas\syou've\sjust\selegantly\sexplained,\sthat's\r\na\sbad\shack\sthat\sviolates\sthe\sprinciples\sof\sasynchronous\schannels.\s\sSo\r\nlet's\snot\senshrine\sthat\sin\sthe\sdesign,\sbut\sinstead\sget\sto\swork\son\sthe\r\ninternals\sso\sthat\sthings\sremain\ssimple\sat\sthe\sscript\slevel,\sand\swe\scan\r\ncontinue\sto\simprove\sthe\ssituation\sin\sthe\simplementation\sas\sintelligence\r\nand\stime\sresources\sbecome\savailable.
J login pooryorick
J mimetype text/x-fossil-wiki
K de232b49f26da1c18e07513d4c7caa203cd27910
U pooryorick
Z 94d114bed9e126f43879453bc31b40e1