Tcl Source Code

Hex Artifact Content
Login

Artifact 40e85b6fd7ef453ea6e739b22486d34867de3679b903eb60c421a59bdb0fc308:

Ticket change [40e85b6fd7] - Ticket [de232b49f26da1c1|de232b49f2] <i>write-only nonblocking refchan and Tcl internal buffers</i> status still Open with 3 other changes by apnadkarni 2024-03-31 15:49:13.
0000: 44 20 32 30 32 34 2d 30 33 2d 33 31 54 31 35 3a  D 2024-03-31T15:
0010: 34 39 3a 31 33 2e 31 30 36 0a 4a 20 69 63 6f 6d  49:13.106.J icom
0020: 6d 65 6e 74 20 41 73 5c 73 69 74 5c 73 73 74 61  ment As\sit\ssta
0030: 6e 64 73 2c 5c 73 74 68 65 72 65 5c 73 69 73 5c  nds,\sthere\sis\
0040: 73 61 6e 6f 74 68 65 72 5c 73 70 72 6f 62 6c 65  sanother\sproble
0050: 6d 5c 73 77 69 74 68 5c 73 74 68 65 5c 73 63 75  m\swith\sthe\scu
0060: 72 72 65 6e 74 5c 73 69 6d 70 6c 65 6d 65 6e 74  rrent\simplement
0070: 61 74 69 6f 6e 2e 5c 73 49 66 5c 73 72 75 6e 5c  ation.\sIf\srun\
0080: 73 69 6e 5c 73 77 69 73 68 2c 5c 73 69 74 5c 73  sin\swish,\sit\s
0090: 66 72 65 65 7a 65 73 5c 73 74 68 65 5c 73 47 55  freezes\sthe\sGU
00a0: 49 5c 73 61 73 5c 73 74 68 65 5c 73 69 64 6c 65  I\sas\sthe\sidle
00b0: 5c 73 65 76 65 6e 74 73 5c 73 6e 65 76 65 72 5c  \sevents\snever\
00c0: 73 67 65 74 5c 73 74 6f 5c 73 72 75 6e 2e 5c 73  sget\sto\srun.\s
00d0: 49 5c 73 73 75 73 70 65 63 74 5c 73 74 68 65 5c  I\ssuspect\sthe\
00e0: 73 77 72 69 74 65 5c 73 65 76 65 6e 74 5c 73 6b  swrite\sevent\sk
00f0: 65 65 70 73 5c 73 67 65 74 74 69 6e 67 5c 73 71  eeps\sgetting\sq
0100: 75 65 75 65 64 5c 73 61 66 74 65 72 5c 73 61 6e  ueued\safter\san
0110: 5c 73 69 6e 74 65 72 76 61 6c 5c 73 6f 66 5c 73  \sinterval\sof\s
0120: 53 59 4e 54 48 45 54 49 43 5f 45 56 45 4e 54 5f  SYNTHETIC_EVENT_
0130: 54 49 4d 45 5c 73 77 68 69 63 68 5c 73 68 61 70  TIME\swhich\shap
0140: 70 65 6e 73 5c 73 74 6f 5c 73 62 65 5c 73 30 5c  pens\sto\sbe\s0\
0150: 73 77 68 69 63 68 5c 73 6d 65 61 6e 73 5c 73 74  swhich\smeans\st
0160: 68 65 5c 73 65 76 65 6e 74 5c 73 71 75 65 75 65  he\sevent\squeue
0170: 5c 73 69 73 5c 73 6e 65 76 65 72 5c 73 64 72 61  \sis\snever\sdra
0180: 69 6e 65 64 2e 5c 73 54 65 73 74 5c 73 69 6f 2d  ined.\sTest\sio-
0190: 34 34 2e 36 5c 73 77 68 69 63 68 5c 73 74 65 73  44.6\swhich\stes
01a0: 74 73 5c 73 74 68 65 5c 73 69 6d 70 6c 65 6d 65  ts\sthe\simpleme
01b0: 6e 74 61 74 69 6f 6e 5c 73 6e 65 76 65 72 5c 73  ntation\snever\s
01c0: 61 63 74 75 61 6c 6c 79 5c 73 74 65 73 74 73 5c  actually\stests\
01d0: 73 74 68 61 74 5c 73 6f 74 68 65 72 5c 73 65 76  sthat\sother\sev
01e0: 65 6e 74 73 5c 73 61 72 65 5c 73 6e 6f 74 5c 73  ents\sare\snot\s
01f0: 62 6c 6f 63 6b 65 64 2e 5c 72 5c 6e 5c 72 5c 6e  blocked.\r\n\r\n
0200: 54 68 65 5c 73 61 74 74 61 63 68 65 64 5c 73 73  The\sattached\ss
0210: 63 72 69 70 74 5c 73 69 6c 6c 75 73 74 72 61 74  cript\sillustrat
0220: 65 73 5c 73 74 68 69 73 2e 5c 73 54 68 69 73 5c  es\sthis.\sThis\
0230: 73 69 73 5c 73 65 73 73 65 6e 74 69 61 6c 6c 79  sis\sessentially
0240: 5c 73 61 5c 73 6d 6f 64 69 66 69 65 64 5c 73 76  \sa\smodified\sv
0250: 65 72 73 69 6f 6e 5c 73 6f 66 5c 73 69 6f 2d 34  ersion\sof\sio-4
0260: 34 2e 36 2e 5c 72 5c 6e 5c 72 5c 6e 57 69 74 68  4.6.\r\n\r\nWith
0270: 5c 73 74 63 6c 73 68 5c 73 38 2e 36 2c 5c 73 74  \stclsh\s8.6,\st
0280: 68 65 5c 73 74 69 6d 65 5c 73 69 73 5c 73 70 72  he\stime\sis\spr
0290: 69 6e 74 65 64 5c 73 65 76 65 72 79 5c 73 73 65  inted\severy\sse
02a0: 63 6f 6e 64 5c 72 5c 6e 5c 72 5c 6e 60 60 60 5c  cond\r\n\r\n```\
02b0: 72 5c 6e 63 3a 5c 5c 73 72 63 5c 5c 74 63 6c 74  r\nc:\\src\\tclt
02c0: 6b 5c 5c 77 69 70 5c 5c 74 63 6c 5c 5c 74 65 73  k\\wip\\tcl\\tes
02d0: 74 73 3e 74 63 6c 73 68 38 36 74 5c 73 2e 2e 5c  ts>tclsh86t\s..\
02e0: 5c 74 65 73 74 73 5c 5c 72 65 66 63 68 61 6e 2d  \tests\\refchan-
02f0: 61 73 79 6e 63 2d 74 65 73 74 2e 74 63 6c 5c 72  async-test.tcl\r
0300: 5c 6e 31 37 31 31 38 39 39 30 33 31 5c 72 5c 6e  \n1711899031\r\n
0310: 31 37 31 31 38 39 39 30 33 32 5c 72 5c 6e 31 37  1711899032\r\n17
0320: 31 31 38 39 39 30 33 33 5c 72 5c 6e 31 37 31 31  11899033\r\n1711
0330: 38 39 39 30 33 34 5c 72 5c 6e 31 37 31 31 38 39  899034\r\n171189
0340: 39 30 33 35 5c 72 5c 6e 5e 43 5c 72 5c 6e 60 60  9035\r\n^C\r\n``
0350: 60 5c 72 5c 6e 5c 72 5c 6e 57 69 74 68 5c 73 39  `\r\n\r\nWith\s9
0360: 2e 30 5c 73 68 6f 77 65 76 65 72 2c 5c 73 61 66  .0\showever,\saf
0370: 74 65 72 5c 73 74 68 65 5c 73 69 6e 69 74 69 61  ter\sthe\sinitia
0380: 6c 5c 73 69 6e 76 6f 63 61 74 69 6f 6e 5c 73 74  l\sinvocation\st
0390: 68 65 5c 73 74 69 6d 65 5c 73 69 73 5c 73 6e 65  he\stime\sis\sne
03a0: 76 65 72 5c 73 70 72 69 6e 74 65 64 5c 72 5c 6e  ver\sprinted\r\n
03b0: 5c 72 5c 6e 60 60 60 5c 72 5c 6e 63 3a 5c 5c 73  \r\n```\r\nc:\\s
03c0: 72 63 5c 5c 74 63 6c 74 6b 5c 5c 77 69 70 5c 5c  rc\\tcltk\\wip\\
03d0: 74 63 6c 5c 5c 74 65 73 74 73 3e 64 3a 5c 5c 74  tcl\\tests>d:\\t
03e0: 63 6c 5c 5c 39 30 5c 5c 78 36 34 2d 64 65 62 75  cl\\90\\x64-debu
03f0: 67 5c 5c 62 69 6e 5c 5c 74 63 6c 73 68 39 30 2e  g\\bin\\tclsh90.
0400: 65 78 65 5c 73 2e 2e 5c 5c 74 65 73 74 73 5c 5c  exe\s..\\tests\\
0410: 72 65 66 63 68 61 6e 2d 61 73 79 6e 63 2d 74 65  refchan-async-te
0420: 73 74 2e 74 63 6c 5c 72 5c 6e 31 37 31 31 38 39  st.tcl\r\n171189
0430: 39 31 30 30 5c 72 5c 6e 5e 43 5c 72 5c 6e 60 60  9100\r\n^C\r\n``
0440: 60 5c 72 5c 6e 5c 72 5c 6e 54 68 65 5c 73 62 72  `\r\n\r\nThe\sbr
0450: 61 6e 63 68 5c 73 61 70 6e 2d 62 75 67 2d 64 65  anch\sapn-bug-de
0460: 32 33 32 62 34 39 66 32 5c 73 77 6f 72 6b 73 5c  232b49f2\sworks\
0470: 73 70 72 6f 70 65 72 6c 79 5c 72 5c 6e 5c 72 5c  sproperly\r\n\r\
0480: 6e 60 60 60 5c 72 5c 6e 63 3a 5c 5c 73 72 63 5c  n```\r\nc:\\src\
0490: 5c 74 63 6c 74 6b 5c 5c 77 69 70 5c 5c 74 63 6c  \tcltk\\wip\\tcl
04a0: 5c 5c 74 65 73 74 73 3e 64 3a 5c 5c 74 63 6c 5c  \\tests>d:\\tcl\
04b0: 5c 77 69 70 5c 5c 78 36 34 2d 64 65 62 75 67 5c  \wip\\x64-debug\
04c0: 5c 62 69 6e 5c 5c 74 63 6c 73 68 39 30 2e 65 78  \bin\\tclsh90.ex
04d0: 65 5c 73 2e 2e 5c 5c 74 65 73 74 73 5c 5c 72 65  e\s..\\tests\\re
04e0: 66 63 68 61 6e 2d 61 73 79 6e 63 2d 74 65 73 74  fchan-async-test
04f0: 2e 74 63 6c 5c 72 5c 6e 31 37 31 31 38 39 39 31  .tcl\r\n17118991
0500: 39 37 5c 72 5c 6e 31 37 31 31 38 39 39 31 39 38  97\r\n1711899198
0510: 5c 72 5c 6e 31 37 31 31 38 39 39 31 39 39 5c 72  \r\n1711899199\r
0520: 5c 6e 31 37 31 31 38 39 39 32 30 30 5c 72 5c 6e  \n1711899200\r\n
0530: 5e 43 5c 72 5c 6e 60 60 60 5c 72 5c 6e 5c 72 5c  ^C\r\n```\r\n\r\
0540: 6e 4e 6f 77 5c 73 63 6f 75 6c 64 5c 73 6f 6e 65  nNow\scould\sone
0550: 5c 73 63 68 61 6e 67 65 5c 73 53 59 4e 54 48 45  \schange\sSYNTHE
0560: 54 49 43 5f 45 56 45 4e 54 5f 54 49 4d 45 5c 73  TIC_EVENT_TIME\s
0570: 74 6f 5c 73 73 6f 6d 65 74 68 69 6e 67 5c 73 6f  to\ssomething\so
0580: 74 68 65 72 5c 73 74 68 61 6e 5c 73 30 3f 5c 73  ther\sthan\s0?\s
0590: 54 68 65 5c 73 63 6f 6d 6d 65 6e 74 5c 73 74 68  The\scomment\sth
05a0: 65 72 65 5c 73 73 61 79 73 5c 73 2a 4d 75 73 74  ere\ssays\s*Must
05b0: 5c 73 62 65 5c 73 7a 65 72 6f 5c 73 6f 72 5c 73  \sbe\szero\sor\s
05c0: 62 61 64 5c 73 74 68 69 6e 67 73 5c 73 74 65 6e  bad\sthings\sten
05d0: 64 5c 73 74 6f 5c 73 68 61 70 70 65 6e 2a 2e 5c  d\sto\shappen*.\
05e0: 73 43 6f 75 6c 64 5c 73 69 74 5c 73 70 6f 73 73  sCould\sit\sposs
05f0: 69 62 6c 79 5c 73 64 6f 5c 73 74 68 65 5c 73 65  ibly\sdo\sthe\se
0600: 71 75 69 76 61 6c 65 6e 74 5c 73 6f 66 5c 73 22  quivalent\sof\s"
0610: 61 66 74 65 72 5c 73 69 64 6c 65 5c 73 61 66 74  after\sidle\saft
0620: 65 72 5c 73 30 22 3f 5c 73 49 5c 73 73 75 73 70  er\s0"?\sI\ssusp
0630: 65 63 74 5c 73 74 68 69 73 5c 73 77 69 6c 6c 5c  ect\sthis\swill\
0640: 73 68 61 76 65 5c 73 74 68 65 5c 73 73 61 6d 65  shave\sthe\ssame
0650: 5c 73 75 6e 64 65 73 69 72 61 62 6c 65 5c 73 65  \sundesirable\se
0660: 66 66 65 63 74 5c 73 61 73 5c 73 63 68 61 6e 67  ffect\sas\schang
0670: 69 6e 67 5c 73 53 59 4e 54 48 45 54 49 43 5f 45  ing\sSYNTHETIC_E
0680: 56 45 4e 54 5f 54 49 4d 45 5c 73 61 6e 64 5c 73  VENT_TIME\sand\s
0690: 61 6e 79 77 61 79 73 5c 73 66 65 65 6c 73 5c 73  anyways\sfeels\s
06a0: 6c 69 6b 65 5c 73 61 5c 73 70 61 74 63 68 5c 73  like\sa\spatch\s
06b0: 66 6f 72 5c 73 61 5c 73 70 61 74 63 68 5c 73 66  for\sa\spatch\sf
06c0: 6f 72 5c 73 66 75 6e 64 61 6d 65 6e 74 61 6c 6c  or\sfundamentall
06d0: 79 5c 73 62 72 6f 6b 65 6e 5c 73 64 65 73 69 67  y\sbroken\sdesig
06e0: 6e 2e 5c 72 5c 6e 5c 72 5c 6e 54 68 65 5c 73 61  n.\r\n\r\nThe\sa
06f0: 62 6f 76 65 5c 73 69 6c 6c 75 73 74 72 61 74 65  bove\sillustrate
0700: 73 5c 73 74 63 6c 73 68 5c 73 62 75 74 5c 73 74  s\stclsh\sbut\st
0710: 68 65 5c 73 73 61 6d 65 5c 73 65 66 66 65 63 74  he\ssame\seffect
0720: 5c 73 69 73 5c 73 73 65 65 6e 5c 73 77 69 74 68  \sis\sseen\swith
0730: 5c 73 77 69 73 68 2e 5c 72 5c 6e 5c 72 5c 6e 60  \swish.\r\n\r\n`
0740: 60 60 5c 72 5c 6e 64 3a 5c 5c 74 63 6c 5c 5c 77  ``\r\nd:\\tcl\\w
0750: 69 70 5c 5c 78 36 34 2d 64 65 62 75 67 5c 5c 62  ip\\x64-debug\\b
0760: 69 6e 5c 5c 77 69 73 68 39 30 2e 65 78 65 5c 73  in\\wish90.exe\s
0770: 2e 2e 5c 5c 74 65 73 74 73 5c 5c 72 65 66 63 68  ..\\tests\\refch
0780: 61 6e 2d 61 73 79 6e 63 2d 74 65 73 74 2e 74 63  an-async-test.tc
0790: 6c 5c 72 5c 6e 60 60 60 5c 72 5c 6e 5c 72 5c 6e  l\r\n```\r\n\r\n
07a0: 70 6f 70 73 5c 73 75 70 5c 73 61 5c 73 74 65 78  pops\sup\sa\stex
07b0: 74 5c 73 77 69 64 67 65 74 5c 73 74 68 61 74 5c  t\swidget\sthat\
07c0: 73 63 61 6e 5c 73 62 65 5c 73 65 64 69 74 65 64  scan\sbe\sedited
07d0: 2e 5c 73 4f 6e 5c 73 74 68 65 5c 73 6f 74 68 65  .\sOn\sthe\sothe
07e0: 72 5c 73 68 61 6e 64 2c 5c 73 77 69 74 68 5c 73  r\shand,\swith\s
07f0: 74 68 65 5c 73 65 78 69 73 74 69 6e 67 5c 73 39  the\sexisting\s9
0800: 2e 30 2c 5c 73 74 68 65 5c 73 74 65 78 74 5c 73  .0,\sthe\stext\s
0810: 77 69 64 67 65 74 5c 73 69 73 5c 73 73 68 6f 77  widget\sis\sshow
0820: 6e 5c 73 62 75 74 5c 73 6e 6f 5c 73 63 68 61 72  n\sbut\sno\schar
0830: 61 63 74 65 72 73 5c 73 61 72 65 5c 73 64 69 73  acters\sare\sdis
0840: 70 6c 61 79 65 64 5c 73 77 68 65 6e 5c 73 79 6f  played\swhen\syo
0850: 75 5c 73 74 79 70 65 5c 73 61 6e 64 5c 73 74 68  u\stype\sand\sth
0860: 65 5c 73 47 55 49 5c 73 61 70 70 65 61 72 73 5c  e\sGUI\sappears\
0870: 73 66 72 6f 7a 65 6e 2e 5c 72 5c 6e 5c 72 5c 6e  sfrozen.\r\n\r\n
0880: 54 68 69 73 2e 5c 73 50 6f 6c 6c 69 6e 67 2e 5c  This.\sPolling.\
0890: 73 42 61 73 65 64 2e 5c 73 44 65 73 69 67 6e 2e  sBased.\sDesign.
08a0: 5c 73 46 6f 72 2e 5c 73 45 76 65 6e 74 73 2e 5c  \sFor.\sEvents.\
08b0: 73 49 73 2e 5c 73 4a 75 73 74 2e 5c 73 50 6c 61  sIs.\sJust.\sPla
08c0: 69 6e 2e 5c 73 57 72 6f 6e 67 2e 5c 72 5c 6e 5c  in.\sWrong.\r\n\
08d0: 72 5c 6e 2f 41 73 68 6f 6b 0a 4a 20 6c 6f 67 69  r\n/Ashok.J logi
08e0: 6e 20 61 70 6e 61 64 6b 61 72 6e 69 0a 4a 20 6d  n apnadkarni.J m
08f0: 69 6d 65 74 79 70 65 20 74 65 78 74 2f 78 2d 6d  imetype text/x-m
0900: 61 72 6b 64 6f 77 6e 0a 4b 20 64 65 32 33 32 62  arkdown.K de232b
0910: 34 39 66 32 36 64 61 31 63 31 38 65 30 37 35 31  49f26da1c18e0751
0920: 33 64 34 63 37 63 61 61 32 30 33 63 64 32 37 39  3d4c7caa203cd279
0930: 31 30 0a 55 20 61 70 6e 61 64 6b 61 72 6e 69 0a  10.U apnadkarni.
0940: 5a 20 36 65 61 32 36 36 37 36 34 65 33 30 39 63  Z 6ea266764e309c
0950: 30 38 33 62 65 36 63 30 35 34 32 35 39 64 34 33  083be6c054259d43
0960: 66 61 0a                                         fa.