Artifact
b11ef71db56e7fc8312483930d6986fb4b827f7783fd366c55ef42acd62f72d7 :
Ticket change
[b11ef71db5]
- Ticket
[de232b49f26da1c1|de232b49f2] <i>write-only nonblocking refchan and Tcl internal buffers</i> status still Open with 3 other changes
by
apnadkarni
2024-04-02 07:35:31.
0000: 44 20 32 30 32 34 2d 30 34 2d 30 32 54 30 37 3a D 2024-04-02T07:
0010: 33 35 3a 33 31 2e 32 38 35 0a 4a 20 69 63 6f 6d 35:31.285.J icom
0020: 6d 65 6e 74 20 4e 61 74 68 61 6e 2c 5c 72 5c 6e ment Nathan,\r\n
0030: 5c 72 5c 6e 49 27 6c 6c 5c 73 6d 61 6b 65 5c 73 \r\nI'll\smake\s
0040: 6f 6e 65 5c 73 6c 61 73 74 5c 73 61 74 74 65 6d one\slast\sattem
0050: 70 74 5c 73 61 74 5c 73 70 65 72 73 75 61 73 69 pt\sat\spersuasi
0060: 6f 6e 5c 73 74 68 61 74 5c 72 5c 6e 5c 72 5c 6e on\sthat\r\n\r\n
0070: 2d 5c 73 66 72 6f 6d 5c 73 61 6e 5c 73 61 72 63 -\sfrom\san\sarc
0080: 68 69 74 65 63 74 75 72 61 6c 5c 73 70 6f 69 6e hitectural\spoin
0090: 74 5c 73 6f 66 5c 73 76 69 65 77 2c 5c 73 67 65 t\sof\sview,\sge
00a0: 6e 65 72 61 74 69 6e 67 5c 73 49 2f 4f 5c 73 63 nerating\sI/O\sc
00b0: 61 6c 6c 62 61 63 6b 5c 73 65 76 65 6e 74 73 5c allback\sevents\
00c0: 73 77 69 74 68 6f 75 74 5c 72 5c 6e 6b 6e 6f 77 swithout\r\nknow
00d0: 69 6e 67 5c 73 63 68 61 6e 6e 65 6c 5c 73 73 74 ing\schannel\sst
00e0: 61 74 65 5c 73 69 73 5c 73 6e 6f 74 5c 73 61 74 ate\sis\snot\sat
00f0: 5c 73 61 6c 6c 5c 73 61 6e 5c 73 61 70 70 72 6f \sall\san\sappro
0100: 70 72 69 61 74 65 5c 73 6d 6f 64 65 6c 5c 73 66 priate\smodel\sf
0110: 6f 72 5c 73 61 73 79 6e 63 5c 73 65 76 65 6e 74 or\sasync\sevent
0120: 5c 73 64 72 69 76 65 6e 5c 72 5c 6e 49 2f 4f 2e \sdriven\r\nI/O.
0130: 5c 72 5c 6e 5c 72 5c 6e 2d 5c 73 54 68 65 5c 73 \r\n\r\n-\sThe\s
0140: 72 65 6c 61 74 65 64 5c 73 63 68 61 6e 67 65 73 related\schanges
0150: 5c 73 69 6e 5c 73 74 72 75 6e 6b 5c 73 76 69 73 \sin\strunk\svis
0160: 2d 61 2d 76 69 73 5c 73 38 2e 36 5c 73 61 72 65 -a-vis\s8.6\sare
0170: 5c 73 62 72 6f 6b 65 6e 5c 73 69 6e 5c 73 6d 75 \sbroken\sin\smu
0180: 6c 74 69 70 6c 65 5c 73 61 73 70 65 63 74 73 2c ltiple\saspects,
0190: 5c 72 5c 6e 6d 6f 73 74 6c 79 5c 73 62 65 63 61 \r\nmostly\sbeca
01a0: 75 73 65 5c 73 6f 66 5c 73 74 68 65 5c 73 61 62 use\sof\sthe\sab
01b0: 6f 76 65 2e 5c 72 5c 6e 5c 72 5c 6e 54 68 65 5c ove.\r\n\r\nThe\
01c0: 73 6d 6f 74 69 76 61 74 69 6f 6e 5c 73 66 6f 72 smotivation\sfor
01d0: 5c 73 61 73 79 6e 63 5c 73 69 2f 6f 5c 73 69 73 \sasync\si/o\sis
01e0: 5c 73 74 68 61 74 5c 73 61 70 70 6c 69 63 61 74 \sthat\sapplicat
01f0: 69 6f 6e 73 5c 73 63 61 6e 5c 73 64 6f 5c 73 75 ions\scan\sdo\su
0200: 73 65 66 75 6c 5c 73 77 6f 72 6b 5c 73 77 68 69 seful\swork\swhi
0210: 6c 65 5c 72 5c 6e 77 61 69 74 69 6e 67 5c 73 66 le\r\nwaiting\sf
0220: 6f 72 5c 73 49 2f 4f 5c 73 74 6f 5c 73 63 6f 6d or\sI/O\sto\scom
0230: 70 6c 65 74 65 2e 5c 73 4e 6f 77 5c 73 74 68 69 plete.\sNow\sthi
0240: 73 5c 73 62 79 5c 73 69 74 73 65 6c 66 5c 73 64 s\sby\sitself\sd
0250: 6f 65 73 5c 73 6e 6f 74 5c 73 6e 65 65 64 5c 73 oes\snot\sneed\s
0260: 73 65 6c 65 63 74 5c 73 6f 6e 5c 73 55 6e 69 78 select\son\sUnix
0270: 2c 5c 72 5c 6e 63 6f 6d 70 6c 65 74 69 6f 6e 5c ,\r\ncompletion\
0280: 73 70 6f 72 74 73 5c 73 6f 6e 5c 73 57 69 6e 64 sports\son\sWind
0290: 6f 77 73 5c 73 6f 72 5c 73 66 69 6c 65 65 76 65 ows\sor\sfileeve
02a0: 6e 74 5c 73 69 6e 5c 73 54 63 6c 2e 5c 73 4f 6e nt\sin\sTcl.\sOn
02b0: 65 5c 73 63 61 6e 5c 73 6a 75 73 74 5c 73 63 61 e\scan\sjust\sca
02c0: 6c 6c 5c 73 74 68 65 5c 73 69 2f 6f 5c 72 5c 6e ll\sthe\si/o\r\n
02d0: 66 75 6e 63 74 69 6f 6e 73 5c 73 61 6e 64 5c 73 functions\sand\s
02e0: 63 68 65 63 6b 5c 73 66 6f 72 5c 73 22 45 41 47 check\sfor\s"EAG
02f0: 41 49 4e 22 5c 73 65 71 75 69 76 61 6c 65 6e 74 AIN"\sequivalent
0300: 73 2e 5c 73 54 68 65 72 65 5c 73 61 72 65 5c 73 s.\sThere\sare\s
0310: 6d 75 6c 74 69 70 6c 65 5c 73 70 72 6f 62 6c 65 multiple\sproble
0320: 6d 73 5c 73 77 69 74 68 5c 72 5c 6e 74 68 69 73 ms\swith\r\nthis
0330: 5c 73 61 73 5c 73 74 68 65 5c 73 61 70 70 6c 69 \sas\sthe\sappli
0340: 63 61 74 69 6f 6e 5c 73 68 61 73 5c 73 74 6f 5c cation\shas\sto\
0350: 73 70 6f 6c 6c 3a 5c 72 5c 6e 5c 72 5c 6e 2d 5c spoll:\r\n\r\n-\
0360: 73 54 72 79 5c 73 74 6f 6f 5c 73 66 72 65 71 75 sTry\stoo\sfrequ
0370: 65 6e 74 6c 79 5c 73 61 6e 64 5c 73 69 74 73 5c ently\sand\sits\
0380: 73 77 61 73 74 69 6e 67 5c 73 70 72 6f 63 65 73 swasting\sproces
0390: 73 69 6e 67 5c 73 63 79 63 6c 65 73 5c 73 70 72 sing\scycles\spr
03a0: 6f 63 65 73 73 69 6e 67 5c 73 45 41 47 41 49 4e ocessing\sEAGAIN
03b0: 53 2e 5c 72 5c 6e 5c 72 5c 6e 2d 5c 73 54 72 79 S.\r\n\r\n-\sTry
03c0: 5c 73 74 6f 6f 5c 73 69 6e 66 72 65 71 75 65 6e \stoo\sinfrequen
03d0: 74 6c 79 5c 73 61 6e 64 5c 73 74 68 65 72 65 5c tly\sand\sthere\
03e0: 73 69 73 5c 73 61 6e 5c 73 75 6e 6e 65 63 65 73 sis\san\sunneces
03f0: 73 61 72 79 5c 73 64 65 6c 61 79 5c 73 2f 5c 73 sary\sdelay\s/\s
0400: 6c 61 74 65 6e 63 79 5c 73 69 6e 5c 73 73 65 72 latency\sin\sser
0410: 76 69 63 69 6e 67 5c 72 5c 6e 49 2f 4f 5c 73 72 vicing\r\nI/O\sr
0420: 65 71 75 65 73 74 73 2e 5c 72 5c 6e 5c 72 5c 6e equests.\r\n\r\n
0430: 41 6e 5c 73 65 76 65 6e 74 5c 73 73 79 73 74 65 An\sevent\ssyste
0440: 6d 5c 73 73 6f 6c 76 65 73 5c 73 62 6f 74 68 5c m\ssolves\sboth\
0450: 73 74 68 65 5c 73 61 62 6f 76 65 5c 73 2a 2a 61 sthe\sabove\s**a
0460: 73 5c 73 6c 6f 6e 67 5c 73 61 73 5c 73 65 76 65 s\slong\sas\seve
0470: 6e 74 73 5c 73 61 72 65 5c 73 67 65 6e 65 72 61 nts\sare\sgenera
0480: 74 65 64 5c 73 62 61 73 65 64 5c 73 6f 6e 5c 72 ted\sbased\son\r
0490: 5c 6e 74 68 65 5c 73 49 2f 4f 5c 73 73 74 61 74 \nthe\sI/O\sstat
04a0: 65 2e 2a 2a 5c 73 4e 6f 5c 73 74 69 6d 65 5c 73 e.**\sNo\stime\s
04b0: 69 73 5c 73 77 61 73 74 65 64 5c 73 69 6e 5c 73 is\swasted\sin\s
04c0: 75 6e 6e 65 63 65 73 73 61 72 79 5c 73 70 6f 6c unnecessary\spol
04d0: 6c 73 5c 73 61 6e 64 5c 73 74 68 65 72 65 5c 73 ls\sand\sthere\s
04e0: 69 73 5c 73 6e 6f 74 5c 72 5c 6e 61 64 64 69 74 is\snot\r\naddit
04f0: 69 6f 6e 61 6c 5c 73 64 65 6c 61 79 5c 73 6f 6e ional\sdelay\son
0500: 63 65 5c 73 74 68 65 5c 73 63 68 61 6e 6e 65 6c ce\sthe\schannel
0510: 5c 73 69 73 5c 73 72 65 61 64 79 5c 73 66 6f 72 \sis\sready\sfor
0520: 5c 73 49 2f 4f 2e 5c 73 48 6f 77 65 76 65 72 2c \sI/O.\sHowever,
0530: 5c 73 69 66 5c 73 49 2f 4f 5c 73 65 76 65 6e 74 \sif\sI/O\sevent
0540: 73 5c 73 61 72 65 5c 72 5c 6e 67 65 6e 65 72 61 s\sare\r\ngenera
0550: 74 65 64 5c 73 62 61 73 65 64 5c 73 6f 6e 5c 73 ted\sbased\son\s
0560: 74 69 6d 65 72 73 5c 73 2a 2a 77 69 74 68 5c 73 timers\s**with\s
0570: 6e 6f 5c 73 6b 6e 6f 77 6c 65 64 67 65 5c 73 6f no\sknowledge\so
0580: 66 5c 73 49 2f 4f 5c 73 73 74 61 74 65 2a 2a 5c f\sI/O\sstate**\
0590: 73 69 74 5c 73 68 61 73 5c 73 65 78 61 63 74 6c sit\shas\sexactl
05a0: 79 5c 73 74 68 65 5c 72 5c 6e 73 61 6d 65 5c 73 y\sthe\r\nsame\s
05b0: 65 66 66 65 63 74 5c 73 61 73 5c 73 61 70 70 6c effect\sas\sappl
05c0: 69 63 61 74 69 6f 6e 5c 73 70 6f 6c 6c 69 6e 67 ication\spolling
05d0: 21 5c 73 49 74 5c 73 69 73 5c 73 63 6f 6d 70 6c !\sIt\sis\scompl
05e0: 65 74 65 6c 79 5c 73 70 6f 69 6e 74 6c 65 73 73 etely\spointless
05f0: 5c 73 2d 5c 73 67 65 6e 65 72 61 74 69 6e 67 5c \s-\sgenerating\
0600: 72 5c 6e 65 76 65 6e 74 73 5c 73 77 68 65 6e 5c r\nevents\swhen\
0610: 73 49 2f 4f 5c 73 73 74 61 74 65 5c 73 64 6f 65 sI/O\sstate\sdoe
0620: 73 5c 73 6e 6f 74 5c 73 72 65 66 6c 65 63 74 5c s\snot\sreflect\
0630: 73 63 68 61 6e 6e 65 6c 5c 73 72 65 61 64 69 6e schannel\sreadin
0640: 65 73 73 2c 5c 73 61 6e 64 5c 73 75 6e 6e 65 63 ess,\sand\sunnec
0650: 65 73 73 61 72 79 5c 73 64 65 6c 61 79 73 5c 72 essary\sdelays\r
0660: 5c 6e 61 66 74 65 72 5c 73 72 65 61 64 69 6e 65 \nafter\sreadine
0670: 73 73 5c 73 62 65 66 6f 72 65 5c 73 74 68 65 5c ss\sbefore\sthe\
0680: 73 74 69 6d 65 72 5c 73 65 78 70 69 72 65 73 2e stimer\sexpires.
0690: 5c 73 49 66 5c 73 79 6f 75 5c 73 74 72 75 6c 79 \sIf\syou\struly
06a0: 5c 73 62 65 6c 69 65 76 65 5c 73 74 68 69 73 5c \sbelieve\sthis\
06b0: 73 61 73 5c 73 61 5c 72 5c 6e 73 6f 6c 75 74 69 sas\sa\r\nsoluti
06c0: 6f 6e 2c 5c 73 79 6f 75 5c 73 73 68 6f 75 6c 64 on,\syou\sshould
06d0: 5c 73 62 65 5c 73 61 6d 65 6e 61 62 6c 65 5c 73 \sbe\samenable\s
06e0: 74 6f 5c 73 63 6f 6d 70 6c 65 74 65 6c 79 5c 73 to\scompletely\s
06f0: 67 65 74 74 69 6e 67 5c 73 72 69 64 5c 73 6f 66 getting\srid\sof
0700: 5c 73 54 63 6c 27 73 5c 73 49 2f 4f 5c 73 72 65 \sTcl's\sI/O\sre
0710: 6c 61 74 65 64 5c 72 5c 6e 65 76 65 6e 74 5c 73 lated\r\nevent\s
0720: 73 75 62 73 79 73 74 65 6d 21 5c 73 54 68 65 5c subsystem!\sThe\
0730: 73 61 70 70 6c 69 63 61 74 69 6f 6e 5c 73 63 6f sapplication\sco
0740: 75 6c 64 5c 73 6a 75 73 74 5c 73 67 65 6e 65 72 uld\sjust\sgener
0750: 61 74 65 5c 73 77 72 69 74 65 5c 73 65 76 65 6e ate\swrite\seven
0760: 74 73 5c 73 75 73 69 6e 67 5c 73 60 63 68 61 6e ts\susing\s`chan
0770: 5c 72 5c 6e 70 6f 73 74 65 76 65 6e 74 60 5c 73 \r\npostevent`\s
0780: 6f 6e 5c 73 61 5c 73 72 65 67 75 6c 61 72 5c 73 on\sa\sregular\s
0790: 62 61 73 69 73 5c 73 77 69 74 68 5c 73 60 61 66 basis\swith\s`af
07a0: 74 65 72 60 2e 5c 73 54 68 69 73 5c 73 69 73 5c ter`.\sThis\sis\
07b0: 73 62 61 73 69 63 61 6c 6c 79 5c 73 77 68 61 74 sbasically\swhat
07c0: 5c 73 74 68 65 5c 73 63 75 72 72 65 6e 74 5c 72 \sthe\scurrent\r
07d0: 5c 6e 54 63 6c 5c 73 39 5c 73 69 6d 70 6c 65 6d \nTcl\s9\simplem
07e0: 65 6e 74 61 74 69 6f 6e 5c 73 64 6f 65 73 2c 5c entation\sdoes,\
07f0: 73 71 75 65 75 65 69 6e 67 5c 73 65 76 65 6e 74 squeueing\sevent
0800: 73 5c 73 6f 6e 5c 73 61 5c 73 74 69 6d 65 72 5c s\son\sa\stimer\
0810: 73 62 61 73 69 73 2e 5c 72 5c 6e 5c 72 5c 6e 54 sbasis.\r\n\r\nT
0820: 68 65 5c 73 61 62 6f 76 65 5c 73 69 73 5c 73 74 he\sabove\sis\st
0830: 68 65 5c 73 6d 6f 74 69 76 61 74 69 6f 6e 5c 73 he\smotivation\s
0840: 66 6f 72 5c 73 61 73 79 6e 63 2f 65 76 65 6e 74 for\sasync/event
0850: 2d 64 72 69 76 65 6e 5c 73 6f 70 65 72 61 74 69 -driven\soperati
0860: 6f 6e 5c 73 66 72 6f 6d 5c 73 61 6e 5c 72 5c 6e on\sfrom\san\r\n
0870: 65 66 66 69 63 69 65 6e 63 79 5c 73 61 6e 64 5c efficiency\sand\
0880: 73 70 65 72 66 6f 72 6d 61 6e 63 65 5c 73 70 65 sperformance\spe
0890: 72 73 70 65 63 74 69 76 65 2e 5c 73 48 6f 77 65 rspective.\sHowe
08a0: 76 65 72 2c 5c 73 74 68 65 72 65 5c 73 69 73 5c ver,\sthere\sis\
08b0: 73 61 6c 73 6f 5c 73 74 68 65 5c 73 22 73 69 6d salso\sthe\s"sim
08c0: 70 6c 65 22 5c 72 5c 6e 6d 61 74 74 65 72 5c 73 ple"\r\nmatter\s
08d0: 6f 66 5c 73 63 6f 72 72 65 63 74 6e 65 73 73 2e of\scorrectness.
08e0: 5c 73 41 6e 5c 73 65 76 65 6e 74 5c 73 73 68 6f \sAn\sevent\ssho
08f0: 75 6c 64 5c 73 6e 6f 74 5c 73 62 65 5c 73 67 65 uld\snot\sbe\sge
0900: 6e 65 72 61 74 65 64 5c 73 70 72 65 6d 61 74 75 nerated\sprematu
0910: 72 65 6c 79 5c 72 5c 6e 72 65 66 6c 65 63 74 69 rely\r\nreflecti
0920: 6e 67 5c 73 61 5c 73 73 74 61 74 65 5c 73 74 68 ng\sa\sstate\sth
0930: 61 74 5c 73 64 6f 65 73 5c 73 6e 6f 74 5c 73 61 at\sdoes\snot\sa
0940: 63 74 75 61 6c 6c 79 5c 73 65 78 69 73 74 2e 5c ctually\sexist.\
0950: 72 5c 6e 5c 72 5c 6e 49 6e 5c 73 6f 74 68 65 72 r\n\r\nIn\sother
0960: 5c 73 77 6f 72 64 73 2c 5c 73 66 72 6f 6d 5c 73 \swords,\sfrom\s
0970: 62 6f 74 68 5c 73 74 68 65 5c 73 70 65 72 66 6f both\sthe\sperfo
0980: 72 6d 61 6e 63 65 5c 73 61 6e 64 5c 73 63 6f 72 rmance\sand\scor
0990: 72 65 63 74 6e 65 73 73 5c 73 70 6f 69 6e 74 5c rectness\spoint\
09a0: 73 6f 66 5c 73 76 69 65 77 2c 5c 73 74 68 65 5c sof\sview,\sthe\
09b0: 72 5c 6e 63 75 72 72 65 6e 74 5c 73 74 69 6d 65 r\ncurrent\stime
09c0: 72 5c 73 62 61 73 65 64 5c 73 77 72 69 74 65 5c r\sbased\swrite\
09d0: 73 65 76 65 6e 74 5c 73 67 65 6e 65 72 61 74 69 sevent\sgenerati
09e0: 6f 6e 5c 73 69 6e 5c 73 43 68 61 6e 6e 65 6c 54 on\sin\sChannelT
09f0: 69 6d 65 72 50 72 6f 63 5c 73 2a 2a 77 68 69 63 imerProc\s**whic
0a00: 68 5c 73 69 73 5c 73 6e 6f 74 5c 72 5c 6e 62 61 h\sis\snot\r\nba
0a10: 73 65 64 5c 73 6f 6e 5c 73 63 68 61 6e 6e 65 6c sed\son\schannel
0a20: 5c 73 73 74 61 74 65 2a 2a 5c 73 69 73 5c 73 66 \sstate**\sis\sf
0a30: 75 6e 64 61 6d 65 6e 74 61 6c 6c 79 5c 73 66 6c undamentally\sfl
0a40: 61 77 65 64 2e 5c 73 49 74 5c 73 64 6f 65 73 5c awed.\sIt\sdoes\
0a50: 73 6e 6f 74 5c 73 66 75 6c 66 69 6c 5c 73 74 68 snot\sfulfil\sth
0a60: 65 5c 72 5c 6e 69 6e 74 65 6e 64 65 64 5c 73 70 e\r\nintended\sp
0a70: 75 72 70 6f 73 65 5c 73 6f 66 5c 73 61 6e 5c 73 urpose\sof\san\s
0a80: 65 76 65 6e 74 5c 73 62 61 73 65 64 5c 73 69 2f event\sbased\si/
0a90: 6f 5c 73 73 79 73 74 65 6d 5c 73 62 79 5c 73 65 o\ssystem\sby\se
0aa0: 73 73 65 6e 74 69 61 6c 6c 79 5c 73 70 6f 6c 6c ssentially\spoll
0ab0: 69 6e 67 2c 5c 73 61 6e 64 5c 72 5c 6e 6d 6f 72 ing,\sand\r\nmor
0ac0: 65 6f 76 65 72 5c 73 64 6f 65 73 5c 73 6e 6f 74 eover\sdoes\snot
0ad0: 5c 73 6d 65 65 74 5c 73 63 6f 72 72 65 63 74 6e \smeet\scorrectn
0ae0: 65 73 73 5c 73 63 72 69 74 65 72 69 61 5c 73 61 ess\scriteria\sa
0af0: 73 5c 73 69 74 5c 73 68 61 73 5c 73 6e 6f 5c 73 s\sit\shas\sno\s
0b00: 69 64 65 61 5c 73 6f 66 5c 73 63 68 61 6e 6e 65 idea\sof\schanne
0b10: 6c 5c 73 73 74 61 74 65 5c 72 5c 6e 61 6e 64 5c l\sstate\r\nand\
0b20: 73 67 65 6e 65 72 61 74 65 73 5c 73 65 76 65 6e sgenerates\seven
0b30: 74 73 5c 73 70 72 65 6d 61 74 75 72 65 6c 79 5c ts\sprematurely\
0b40: 73 28 31 34 2e 31 31 5c 73 66 61 69 6c 75 72 65 s(14.11\sfailure
0b50: 29 2e 5c 72 5c 6e 5c 72 5c 6e 41 6c 6c 5c 73 74 ).\r\n\r\nAll\st
0b60: 68 65 5c 73 61 62 6f 76 65 5c 73 69 73 5c 73 61 he\sabove\sis\sa
0b70: 5c 73 63 6f 6d 6d 65 6e 74 5c 73 6f 6e 5c 73 65 \scomment\son\se
0b80: 76 65 6e 74 5c 73 64 72 69 76 65 6e 5c 73 69 2f vent\sdriven\si/
0b90: 6f 5c 73 61 6e 64 5c 73 63 68 61 6e 6e 65 6c 73 o\sand\schannels
0ba0: 5c 73 69 6e 5c 73 67 65 6e 65 72 61 6c 2e 5c 73 \sin\sgeneral.\s
0bb0: 4e 6f 77 5c 73 61 73 5c 72 5c 6e 66 61 72 5c 73 Now\sas\r\nfar\s
0bc0: 61 73 5c 73 72 65 66 63 68 61 6e 73 5c 73 61 72 as\srefchans\sar
0bd0: 65 5c 73 63 6f 6e 63 65 72 6e 65 64 2c 5c 73 74 e\sconcerned,\st
0be0: 68 65 72 65 5c 73 69 73 5c 73 61 5c 73 6c 69 6d here\sis\sa\slim
0bf0: 69 74 61 74 69 6f 6e 5c 73 69 6e 5c 73 74 68 65 itation\sin\sthe
0c00: 5c 73 72 65 66 63 68 61 6e 5c 73 66 72 61 6d 65 \srefchan\sframe
0c10: 77 6f 72 6b 5c 73 61 73 5c 72 5c 6e 6d 65 6e 74 work\sas\r\nment
0c20: 69 6f 6e 65 64 5c 73 69 6e 5c 73 61 6e 5c 73 65 ioned\sin\san\se
0c30: 61 72 6c 69 65 72 5c 73 70 6f 73 74 5c 73 77 68 arlier\spost\swh
0c40: 69 63 68 5c 73 6c 65 64 5c 73 74 6f 5c 73 74 68 ich\sled\sto\sth
0c50: 65 5c 73 6f 72 69 67 69 6e 61 6c 5c 73 64 65 66 e\soriginal\sdef
0c60: 65 63 74 5c 73 79 6f 75 5c 73 6c 6f 67 67 65 64 ect\syou\slogged
0c70: 5c 73 69 6e 5c 73 74 68 69 73 5c 72 5c 6e 74 69 \sin\sthis\r\nti
0c80: 63 6b 65 74 2e 5c 73 54 6f 5c 73 72 65 69 74 65 cket.\sTo\sreite
0c90: 72 61 74 65 2c 5c 73 74 68 65 72 65 5c 73 69 73 rate,\sthere\sis
0ca0: 5c 73 6e 6f 5c 73 73 63 72 69 70 74 5c 73 6c 65 \sno\sscript\sle
0cb0: 76 65 6c 5c 73 65 71 75 69 76 61 6c 65 6e 74 5c vel\sequivalent\
0cc0: 73 6f 66 5c 73 74 68 65 5c 72 5c 6e 60 54 63 6c sof\sthe\r\n`Tcl
0cd0: 5f 45 76 65 6e 74 53 65 74 75 70 50 72 6f 63 60 _EventSetupProc`
0ce0: 5c 73 61 6e 64 5c 73 60 54 63 6c 5f 45 76 65 6e \sand\s`Tcl_Even
0cf0: 74 43 68 65 63 6b 50 72 6f 63 60 2e 5c 73 54 68 tCheckProc`.\sTh
0d00: 75 73 5c 73 2a 73 6f 6d 65 2a 2c 5c 73 6e 6f 74 us\s*some*,\snot
0d10: 5c 73 61 6c 6c 2c 5c 73 72 65 66 63 68 61 6e 73 \sall,\srefchans
0d20: 5c 72 5c 6e 61 72 65 5c 73 66 6f 72 63 65 64 5c \r\nare\sforced\
0d30: 73 74 6f 5c 73 75 73 65 5c 73 61 5c 73 74 69 6d sto\suse\sa\stim
0d40: 65 72 5c 73 62 61 73 65 5c 73 73 63 68 65 6d 65 er\sbase\sscheme
0d50: 5c 73 74 6f 5c 73 67 65 6e 65 72 61 74 65 5c 73 \sto\sgenerate\s
0d60: 74 68 65 73 65 5c 73 65 76 65 6e 74 73 2e 5c 73 these\sevents.\s
0d70: 48 6f 77 65 76 65 72 2c 5c 73 2a 2a 74 68 69 73 However,\s**this
0d80: 5c 72 5c 6e 6d 75 73 74 5c 73 62 65 5c 73 64 6f \r\nmust\sbe\sdo
0d90: 6e 65 5c 73 62 79 5c 73 74 68 65 5c 73 72 65 66 ne\sby\sthe\sref
0da0: 63 68 61 6e 5c 73 73 63 72 69 70 74 5c 73 69 6d chan\sscript\sim
0db0: 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 5c 73 69 74 plementation\sit
0dc0: 73 65 6c 66 5c 73 61 6e 64 5c 73 6e 6f 74 5c 73 self\sand\snot\s
0dd0: 74 68 65 5c 73 67 65 6e 65 72 69 63 5c 72 5c 6e the\sgeneric\r\n
0de0: 63 68 61 6e 6e 65 6c 5c 73 69 6e 66 72 61 73 74 channel\sinfrast
0df0: 72 75 63 74 75 72 65 2a 2a 5c 73 62 65 63 61 75 ructure**\sbecau
0e00: 73 65 5c 73 74 68 65 5c 73 66 6f 72 6d 65 72 5c se\sthe\sformer\
0e10: 73 6b 6e 6f 77 73 5c 73 74 68 65 5c 73 63 68 61 sknows\sthe\scha
0e20: 6e 6e 65 6c 5c 73 73 74 61 74 65 2c 5c 73 74 68 nnel\sstate,\sth
0e30: 65 5c 73 6c 61 74 74 65 72 5c 72 5c 6e 64 6f 65 e\slatter\r\ndoe
0e40: 73 5c 73 6e 6f 74 2e 5c 73 54 68 69 73 5c 73 69 s\snot.\sThis\si
0e50: 73 5c 73 73 74 69 6c 6c 5c 73 6e 6f 74 5c 73 69 s\sstill\snot\si
0e60: 64 65 61 6c 5c 73 66 72 6f 6d 5c 73 74 68 65 5c deal\sfrom\sthe\
0e70: 73 65 66 66 69 63 69 65 6e 63 79 5c 73 70 65 72 sefficiency\sper
0e80: 73 70 65 63 74 69 76 65 2c 5c 73 62 75 74 5c 73 spective,\sbut\s
0e90: 62 65 69 6e 67 5c 72 5c 6e 61 62 6c 65 5c 73 74 being\r\nable\st
0ea0: 6f 5c 73 63 68 65 63 6b 5c 73 73 74 61 74 65 2c o\scheck\sstate,
0eb0: 5c 73 69 74 5c 73 69 73 5c 73 61 74 5c 73 6c 65 \sit\sis\sat\sle
0ec0: 61 73 74 5c 73 63 6f 72 72 65 63 74 2e 5c 72 5c ast\scorrect.\r\
0ed0: 6e 5c 72 5c 6e 49 5c 73 62 65 6c 69 65 76 65 5c n\r\nI\sbelieve\
0ee0: 73 74 68 61 74 5c 73 69 73 5c 73 68 6f 77 5c 73 sthat\sis\show\s
0ef0: 41 6e 64 72 65 61 73 27 5c 73 76 69 72 74 63 68 Andreas'\svirtch
0f00: 61 6e 6e 65 6c 5c 73 6d 6f 64 75 6c 65 73 5c 73 annel\smodules\s
0f10: 69 6e 5c 73 74 63 6c 6c 69 62 5c 73 77 6f 72 6b in\stcllib\swork
0f20: 2e 5c 73 41 6e 64 5c 73 61 73 5c 73 70 72 6f 6f .\sAnd\sas\sproo
0f30: 66 5c 72 5c 6e 6f 66 5c 73 63 6f 6e 63 65 70 74 f\r\nof\sconcept
0f40: 2c 5c 73 66 6f 6c 6c 6f 77 69 6e 67 5c 73 74 68 ,\sfollowing\sth
0f50: 65 5c 73 74 63 6c 6c 69 62 5c 73 6d 6f 64 65 6c e\stcllib\smodel
0f60: 2c 5c 73 49 27 76 65 5c 73 6d 6f 64 69 66 69 65 ,\sI've\smodifie
0f70: 64 5c 73 79 6f 75 72 5c 73 72 65 66 63 68 61 6e d\syour\srefchan
0f80: 5c 72 5c 6e 69 6d 70 6c 65 6d 65 6e 74 61 74 69 \r\nimplementati
0f90: 6f 6e 5c 73 6f 66 5c 73 34 34 2e 36 5c 73 61 6e on\sof\s44.6\san
0fa0: 64 5c 73 61 74 74 61 63 68 65 64 5c 73 61 73 5c d\sattached\sas\
0fb0: 73 72 65 66 63 68 61 6e 2d 61 73 79 6e 63 2d 72 srefchan-async-r
0fc0: 65 64 75 78 2e 74 63 6c 5c 73 28 70 72 6f 6f 66 edux.tcl\s(proof
0fd0: 5c 73 6f 66 5c 73 63 6f 6e 63 65 70 74 5c 72 5c \sof\sconcept\r\
0fe0: 6e 6f 6e 6c 79 5c 73 6d 6f 64 65 6c 69 6e 67 5c nonly\smodeling\
0ff0: 73 74 63 6c 6c 69 62 29 2e 5c 73 54 68 69 73 5c stcllib).\sThis\
1000: 73 77 6f 72 6b 73 5c 73 69 6e 5c 73 54 63 6c 5c sworks\sin\sTcl\
1010: 73 38 2e 36 5c 73 61 73 5c 73 77 65 6c 6c 5c 73 s8.6\sas\swell\s
1020: 28 77 68 69 63 68 5c 73 79 6f 75 72 5c 73 76 65 (which\syour\sve
1030: 72 73 69 6f 6e 5c 73 64 69 64 5c 72 5c 6e 6e 6f rsion\sdid\r\nno
1040: 74 29 2e 5c 73 54 4c 3b 44 52 5c 73 74 68 65 5c t).\sTL;DR\sthe\
1050: 73 63 68 61 6e 67 65 73 5c 73 79 6f 75 5c 73 6d schanges\syou\sm
1060: 61 64 65 5c 73 74 6f 5c 73 74 68 65 5c 73 63 6f ade\sto\sthe\sco
1070: 72 65 5c 73 69 6e 5c 73 43 68 61 6e 6e 65 6c 54 re\sin\sChannelT
1080: 69 6d 65 72 50 72 6f 63 5c 73 28 61 29 5c 73 6c imerProc\s(a)\sl
1090: 65 61 64 5c 73 74 6f 5c 73 61 74 5c 72 5c 6e 6c ead\sto\sat\r\nl
10a0: 65 61 73 74 5c 73 74 77 6f 5c 73 62 75 67 73 5c east\stwo\sbugs\
10b0: 73 31 31 2e 31 34 5c 73 61 6e 64 5c 73 65 76 65 s11.14\sand\seve
10c0: 6e 74 5c 73 71 5c 73 73 74 61 72 76 61 74 69 6f nt\sq\sstarvatio
10d0: 6e 2c 5c 73 28 62 29 5c 73 61 66 66 65 63 74 65 n,\s(b)\saffecte
10e0: 64 5c 73 63 68 61 6e 6e 65 6c 73 5c 73 6f 74 68 d\schannels\soth
10f0: 65 72 5c 73 74 68 61 6e 5c 72 5c 6e 72 65 66 63 er\sthan\r\nrefc
1100: 68 61 6e 73 2c 5c 73 28 63 29 5c 73 77 65 72 65 hans,\s(c)\swere
1110: 5c 73 75 6e 6e 65 63 65 73 73 61 72 79 2e 5c 72 \sunnecessary.\r
1120: 5c 6e 5c 72 5c 6e 47 69 76 65 6e 5c 73 28 69 6d \n\r\nGiven\s(im
1130: 68 6f 29 5c 73 74 68 65 5c 73 65 6e 68 61 6e 63 ho)\sthe\senhanc
1140: 65 6d 65 6e 74 5c 73 6f 66 5c 73 74 68 65 5c 73 ement\sof\sthe\s
1150: 72 65 66 63 68 61 6e 5c 73 66 72 61 6d 65 77 6f refchan\sframewo
1160: 72 6b 5c 73 61 73 5c 73 74 6f 6f 5c 73 6d 75 63 rk\sas\stoo\smuc
1170: 68 5c 73 6f 66 5c 73 61 5c 73 72 69 73 6b 5c 73 h\sof\sa\srisk\s
1180: 66 6f 72 5c 72 5c 6e 61 5c 73 39 2e 30 5c 73 72 for\r\na\s9.0\sr
1190: 65 6c 65 61 73 65 2c 5c 73 49 5c 73 73 65 65 5c elease,\sI\ssee\
11a0: 73 74 77 6f 5c 73 70 6f 73 73 69 62 69 6c 69 74 stwo\spossibilit
11b0: 69 65 73 5c 73 74 68 61 74 5c 73 61 72 65 5c 73 ies\sthat\sare\s
11c0: 61 63 63 65 70 74 61 62 6c 65 5c 73 28 6e 6f 74 acceptable\s(not
11d0: 5c 73 70 65 72 66 65 63 74 2c 5c 73 6a 75 73 74 \sperfect,\sjust
11e0: 5c 72 5c 6e 61 63 63 65 70 74 61 62 6c 65 29 5c \r\nacceptable)\
11f0: 73 66 6f 72 5c 73 39 2e 30 5c 73 72 65 6c 65 61 sfor\s9.0\srelea
1200: 73 65 3a 5c 72 5c 6e 5c 72 5c 6e 2d 5c 73 72 65 se:\r\n\r\n-\sre
1210: 76 65 72 74 5c 73 74 68 65 5c 73 69 6d 70 6c 65 vert\sthe\simple
1220: 6d 65 6e 74 61 74 69 6f 6e 5c 73 74 6f 5c 73 77 mentation\sto\sw
1230: 68 61 74 5c 73 38 2e 36 5c 73 64 6f 65 73 2e 5c hat\s8.6\sdoes.\
1240: 73 4e 6f 5c 73 6e 65 65 64 5c 73 66 6f 72 5c 73 sNo\sneed\sfor\s
1250: 2d 62 75 66 66 65 72 69 6e 67 5c 73 6e 6f 6e 65 -buffering\snone
1260: 5c 73 69 6e 5c 72 5c 6e 74 68 69 73 5c 73 63 61 \sin\r\nthis\sca
1270: 73 65 5c 73 62 75 74 5c 73 74 68 65 5c 73 73 63 se\sbut\sthe\ssc
1280: 72 69 70 74 5c 73 6c 65 76 65 6c 5c 73 72 65 66 ript\slevel\sref
1290: 63 68 61 6e 5c 73 69 6d 70 6c 65 6d 65 6e 74 61 chan\simplementa
12a0: 74 69 6f 6e 5c 73 68 61 73 5c 73 74 6f 5c 73 67 tion\shas\sto\sg
12b0: 65 6e 65 72 61 74 65 5c 73 74 69 6d 65 72 5c 72 enerate\stimer\r
12c0: 5c 6e 65 76 65 6e 74 73 2c 5c 73 2a 2a 63 68 65 \nevents,\s**che
12d0: 63 6b 5c 73 73 74 61 74 65 2a 2a 5c 73 61 6e 64 ck\sstate**\sand
12e0: 5c 73 74 68 65 6e 5c 73 64 6f 5c 73 61 5c 73 60 \sthen\sdo\sa\s`
12f0: 61 66 74 65 72 5c 73 69 64 6c 65 5c 73 61 66 74 after\sidle\saft
1300: 65 72 5c 73 30 5c 73 63 68 61 6e 5c 73 70 6f 73 er\s0\schan\spos
1310: 74 65 76 65 6e 74 60 5c 73 66 72 6f 6d 5c 72 5c tevent`\sfrom\r\
1320: 6e 74 68 65 5c 73 74 69 6d 65 72 5c 73 63 61 6c nthe\stimer\scal
1330: 6c 62 61 63 6b 2e 5c 73 53 65 65 5c 73 74 63 6c lback.\sSee\stcl
1340: 6c 69 62 5c 73 6f 72 5c 73 61 74 74 61 63 68 65 lib\sor\sattache
1350: 64 5c 73 73 61 6d 70 6c 65 2e 5c 73 41 6c 74 65 d\ssample.\sAlte
1360: 72 6e 61 74 69 76 65 6c 79 2c 5c 73 74 68 65 5c rnatively,\sthe\
1370: 73 72 65 66 63 68 61 6e 5c 72 5c 6e 63 61 6e 5c srefchan\r\ncan\
1380: 73 64 6f 5c 73 74 68 65 5c 73 2d 62 75 66 66 65 sdo\sthe\s-buffe
1390: 72 69 6e 67 5c 73 6e 6f 6e 65 5c 73 69 74 73 65 ring\snone\sitse
13a0: 6c 66 5c 73 61 6e 64 5c 73 61 76 6f 69 64 5c 73 lf\sand\savoid\s
13b0: 74 68 65 5c 73 74 69 6d 65 72 5c 73 69 66 5c 73 the\stimer\sif\s
13c0: 74 68 61 74 5c 73 73 75 69 74 73 5c 73 69 74 73 that\ssuits\sits
13d0: 5c 73 70 75 72 70 6f 73 65 2e 5c 72 5c 6e 5c 72 \spurpose.\r\n\r
13e0: 5c 6e 2d 5c 73 49 66 5c 73 79 6f 75 5c 73 64 6f \n-\sIf\syou\sdo
13f0: 5c 73 6e 6f 74 5c 73 77 61 6e 74 5c 73 74 68 65 \snot\swant\sthe
1400: 5c 73 63 68 61 6e 6e 65 6c 5c 73 73 63 72 69 70 \schannel\sscrip
1410: 74 5c 73 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f t\simplementatio
1420: 6e 5c 73 74 6f 5c 73 68 61 76 65 5c 73 74 68 61 n\sto\shave\stha
1430: 74 5c 73 72 65 73 70 6f 6e 73 69 62 69 6c 69 74 t\sresponsibilit
1440: 79 2c 5c 72 5c 6e 28 49 5c 73 77 6f 75 6c 64 5c y,\r\n(I\swould\
1450: 73 6c 69 6b 65 5c 73 74 6f 5c 73 6b 6e 6f 77 5c slike\sto\sknow\
1460: 73 77 68 79 5c 73 6e 6f 74 29 5c 73 74 68 65 6e swhy\snot)\sthen
1470: 5c 73 73 65 74 5c 73 2d 62 75 66 66 65 72 69 6e \sset\s-bufferin
1480: 67 5c 73 6e 6f 6e 65 5c 73 66 6f 72 5c 73 72 65 g\snone\sfor\sre
1490: 66 63 68 61 6e 73 5c 73 61 73 5c 72 5c 6e 70 72 fchans\sas\r\npr
14a0: 6f 70 6f 73 65 64 5c 73 69 6e 5c 73 6d 79 5c 73 oposed\sin\smy\s
14b0: 62 72 61 6e 63 68 2e 5c 72 5c 6e 5c 72 5c 6e 49 branch.\r\n\r\nI
14c0: 5c 73 70 72 65 66 65 72 5c 73 28 31 29 2e 5c 72 \sprefer\s(1).\r
14d0: 5c 6e 5c 72 5c 6e 49 5c 73 61 6d 5c 73 70 72 65 \n\r\nI\sam\spre
14e0: 74 74 79 5c 73 6d 75 63 68 5c 73 67 6f 69 6e 67 tty\smuch\sgoing
14f0: 5c 73 74 6f 5c 73 73 74 61 79 5c 73 73 69 6c 65 \sto\sstay\ssile
1500: 6e 74 5c 73 6f 6e 5c 73 74 68 69 73 5c 73 74 6f nt\son\sthis\sto
1510: 70 69 63 5c 73 6e 6f 77 2e 5c 73 49 5c 73 63 61 pic\snow.\sI\sca
1520: 6e 6e 6f 74 5c 73 70 72 6f 76 69 64 65 5c 73 61 nnot\sprovide\sa
1530: 6e 79 5c 72 5c 6e 6d 6f 72 65 5c 73 63 6c 61 72 ny\r\nmore\sclar
1540: 69 74 79 5c 73 6f 6e 5c 73 6d 79 5c 73 6f 62 6a ity\son\smy\sobj
1550: 65 63 74 69 6f 6e 73 2e 5c 73 46 69 6e 61 6c 6c ections.\sFinall
1560: 79 2c 5c 73 73 6f 6d 65 5c 73 67 72 6f 75 70 5c y,\ssome\sgroup\
1570: 73 6f 66 5c 73 70 65 6f 70 6c 65 5c 73 68 61 73 sof\speople\shas
1580: 5c 73 74 6f 5c 73 64 65 63 69 64 65 5c 72 5c 6e \sto\sdecide\r\n
1590: 6f 6e 5c 73 61 5c 73 63 6f 75 72 73 65 5c 73 6f on\sa\scourse\so
15a0: 66 5c 73 61 63 74 69 6f 6e 2e 5c 73 48 6f 70 65 f\saction.\sHope
15b0: 66 75 6c 6c 79 2c 5c 73 74 68 61 74 5c 73 67 72 fully,\sthat\sgr
15c0: 6f 75 70 5c 73 69 73 5c 73 6e 6f 74 5c 73 6a 75 oup\sis\snot\sju
15d0: 73 74 5c 73 79 6f 75 5c 73 61 6e 64 5c 73 6d 65 st\syou\sand\sme
15e0: 2e 0a 4a 20 6c 6f 67 69 6e 20 61 70 6e 61 64 6b ..J login apnadk
15f0: 61 72 6e 69 0a 4a 20 6d 69 6d 65 74 79 70 65 20 arni.J mimetype
1600: 74 65 78 74 2f 78 2d 6d 61 72 6b 64 6f 77 6e 0a text/x-markdown.
1610: 4b 20 64 65 32 33 32 62 34 39 66 32 36 64 61 31 K de232b49f26da1
1620: 63 31 38 65 30 37 35 31 33 64 34 63 37 63 61 61 c18e07513d4c7caa
1630: 32 30 33 63 64 32 37 39 31 30 0a 55 20 61 70 6e 203cd27910.U apn
1640: 61 64 6b 61 72 6e 69 0a 5a 20 61 39 37 65 35 34 adkarni.Z a97e54
1650: 31 31 39 63 62 64 32 62 38 35 62 31 31 32 33 38 119cbd2b85b11238
1660: 32 66 34 38 33 35 35 30 65 34 0a 2f483550e4.