Skip to content
Tcl Source Code Artifact [2ca0eeaa15]
Login

Artifact [2ca0eeaa15]

Artifact 2ca0eeaa15b8db16d77b5ea787db267a953692e6:

Ticket change [2ca0eeaa15] - New ticket [218414ffffffffff|218414ffff] <i>vwait should allow local scope</i>. by nobody on 2000-10-26 00:57:17.
D 2000-10-26T00:57:17
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s5492\sRFE\nVersion:\s8.2.1\nSubmitDate:\s'2000-05-15'\nLastModified:\s'2000-05-15'\nSeverity:\sLOW\nStatus:\sClosed\nSubmitter:\stechsupp\nChangedBy:\shobbs\nOS:\sSolaris\nOSVersion:\s2.6\nMachine:\ssun4u\nFixedDate:\s'2000-10-25'\nClosedDate:\s'2000-05-15'\n\n\nName:\nBenjamin\sVitale\n\nDesiredBehavior:\nIn\sTcl_VwaitObcCmd,\syou\scall\sTcl_TraceVar\swith\sthe\sTCL_GLOBAL_ONLY\sflag.\s\sI\sjust\sran\sup\sagainst\sthe\s\nsame\sproblem\sas\sin\sbug\sid\s#3329\s(I\stried\sto\sappend\smy\sexperience\sto\sthat\sbug,\sbut\sthe\sbugdb\ssent\sme\shere.)\nIt\stook\sme\s5\sminutes\sto\sfigure\sout\swhat\sthe\sproblem\swas.\n\nAnyway,\sI\sguess\sthis\swas\sa\sbit\scounter-intuitive.\s\sI\scan\ssee\sJeff's\spoint\sabout\snot\swanting\sto\strace\sa\slocal\svar,\salthough\sI\swrite\scode\nall\sthe\stime\sto\sdo\stimeouts\sin\snon-event\sdriven\sapps\sthat\swould\sexploit\seven\slocal\svars,\sif\sI\scould.\s\sIn\sgeneral,\sI\sthink\swe\sshould\nfacilitate\stools\sthat\slimit\sglobal\svars.\s\sAt\sleast,\sit\swould\sbe\snice\sto\sallow\svwait\son\snamespace\svars,\sif\snot\slocals.\s\sInstead,\sI\shave\sto\sdo\nvwait\sname::space::var\n\nFor\sexample,\n\nproc\stimed_connect\s{host\sport\stimeout}\s{\n\s\sglobal\ssem\s;#\swould\sbe\snice\sif\sI\scould\savoid\sthis.\s\sat\sleast\swith\sa\snamespace,\sor\sjust\suse\sas\sa\slocal\n\n\s\sset\ss\s[socket\s-async\s$host\s$port]\n\s\safter\s$timeout\s{set\ssem\stimeout}\n\s\sfileevent\s$s\swritable\s{set\ssem\sready}\n\s\svwait\ssem\n\s\setc.\n}\n\nThanks\sfor\supdating\svwait.n\sman\spage.\n\nBTW,\sin\sthe\s8.2.1\sman\spage\snamespace.n,\syou\swrite\s"See\sthe\ssection\sSCOPED\sVALUES..."\sbut\sI\scan\snot\sfind\sthis\ssection.\n\n\n\nIt's\sperfectly\scorrect\sto\suse\snamespace'd\svars\sinstead\sof\sglobal\sones:\n\n(tkcon)\s50\s%\snamespace\seval\s::foo\s{\svariable\sbar\s1\s}\n(tkcon)\s51\s%\safter\s10000\sset\s::foo::bar\s20\nafter#3\n(tkcon)\s52\s%\svwait\s::foo::bar\s;\sputs\shello\nhello\n\nbut\sthe\svar\smust\sjust\sbe\sglobally\sscoped\s(\sit\swould\sbe\sdangerous\nto\ssay\sjust\s'bar',\salways\suse\sthe\s'::foo::bar'\sconstruct\sinstead,\nor\scombine\swith\s[namespace\scurrent]).\s\n--\s05/15/2000\shobbs\nBut\sthe\suser\spoints\sour\sthat\ssimple,\sdefined\slocal\svwaits\swould\sbe\nuseful.\s\sThe\sproblem\sis\sthat\syou\scouldn't\sactually\seffect\sthe\sabove\nafter,\sor\sset\sthe\ssem\sthat\sway\s-\safter\salways\soccurs\sat\sthe\sglobal\nscope\sas\swell.\s\sSince\syou\scan't\sreenter\sinto\sthat\ssame\sephemeral\nproc\sscope,\syou\scan't\suse\svwait\sin\sthis\sway.\s\n--\s05/15/2000\shobbs
J foundin obsolete:\s8.2.1
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 07.\sVariables
J title vwait\sshould\sallow\slocal\sscope
J type Bug
K 218414ffffffffffffffffffffffffffffffffff
U nobody
Z 8a294c49d7b76f3f72de6054380e5d8a