Skip to content
Tcl Source Code Artifact [b0d446b8c9]
Login

Artifact [b0d446b8c9]

Artifact b0d446b8c920bc4e0383d05c714de7c471840ab243becbcce9e692866090d8b0:

Ticket change [b0d446b8c9] - Ticket [cc592ec70de012df|cc592ec70d] <i>vwait not NRE-enabled: C stack busy</i> status still Open with 3 other changes by sebres on 2018-04-16 10:02:31.
D 2018-04-16T10:02:31.650
J icomment The\sproblem\sis\shere\snot\sreally\sthe\sNRE-capability\sas\sis.\r\nSo\sif\svwait\sget\scompiled\svariant\sit\scould\sbe\sinterrupted\swithin\sexecute\sof\scompiled\scode.\s\r\nBut\sthe\squestion\sis\swhy\sit\sshould\sbe\s-\sin\syour\sexample\sthe\svwait\sshould\swait\sfor\svariable\s"forever".\sBut\sthe\sexecution\sof\s"yieldto\sc2"\sshould\sinterrupt\sthe\s"normal"\sflow...\sAnd\sin\sthis\scase\seither\sstop\sthe\svwait\sprocess?\sOr\scontinue\sit\safter\sexit\sfrom\sc2\s(weird\sfor\sme)?\r\n\r\nTo\sexplain\swhat\sdo\syou\sexpect,\sjust\stry\sto\srewrite\sit\swith\s"while",\slike\sthis:\r\n\r\n<code><verbatim>\r\nset\s::forever\s1\r\ncoroutine\sc2\s::apply\s{{}\s{\r\n\s\s\s\syield\r\n\s\s\s\sputs\s[list\sexit\sfrom\scoroutine\s[info\scoroutine]]\r\n}}\r\n\s\r\ncoroutine\sc1\s::apply\s[list\s{}\s{\r\n\s\s\s\sset\sc\s{\r\n\s\s\s\s\s\s\s\sputs\s[list\sin\scoroutine\s[info\scoroutine]]\r\n\s\s\s\s\s\s\s\syieldto\sc2\r\n\s\s\s\s}\r\n\s\s\s\swhile\s{$::forever}\s{\r\n\s\s\s\s\s\s\s\sif\s{$c\sne\s""}\s$c\r\n\s\s\s\s\s\s\s\sset\sc\s""\r\n\s\s\s\s}\r\n\s\s\s\sputs\s[list\sexit\sfrom\scoroutine\s[info\scoroutine]]\r\n}]\r\n</verbatim></code>\r\n\r\nIn\sabove-mentioned\sexample\sthe\sflow\sis\sinterrupted\sand\sendless\swait\sis\sinterrupted:\r\n\r\n<code><verbatim>\r\nin\scoroutine\s::c1\r\nexit\sfrom\scoroutine\s::c2\r\n</verbatim></code>\r\nWould\sit\sexpected\sin\syour\sopinion?\r\n\r\n<hr/>\r\nJust\sas\snotice\sto\sme:\sanother\sstill\sworse\sexample\s(producing\ssegfault\sATM):\r\n<code><verbatim>\r\ncoroutine\sc2\s::apply\s{{}\s{\r\n\s\s\s\syield\r\n\s\s\s\sputs\s[list\sinterim\sin\scoroutine\s[info\scoroutine]]\r\n\s\s\s\syieldto\sc1\r\n\s\s\s\sputs\s[list\sexit\sfrom\scoroutine\s[info\scoroutine]]\r\n\s\s\s\sset\s::forever\s1\r\n}}\r\n\s\r\ncoroutine\sc1\s::apply\s[list\s{}\s{\r\n\s\s\s\safter\s0\s{\r\n\s\s\s\s\s\s\s\sputs\s[list\sin\scoroutine\s[info\scoroutine]]\r\n\s\s\s\s\s\s\s\syieldto\sc2\r\n\s\s\s\s}\r\n\s\s\s\safter\s1\s{\r\n\s\s\s\s\s\s\s\sputs\s[list\sin\scoroutine\s[info\scoroutine]]\r\n\s\s\s\s\s\s\s\syieldto\sc2\r\n\s\s\s\s}\r\n\s\s\s\svwait\s::forever\r\n}]\r\n</verbatim></code>
J login sebres
J mimetype text/x-fossil-wiki
K cc592ec70de012dff030d61affb4b8d62da6cfb6
U sebres
Z f54560aad9b840e0eb0bec93fafc1b8d