.
D 2015-11-11T04:29:36.405
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment When\sa\scoroutine\sis\sdeleted\sby\s[rename]\sor\sthrough\sdeletion\sof\sits\snamespace,\r\nfinally\shandlers\sare\snot\sinvoked:\r\n\r\n\r\n%\scoroutine\sfoo\stry\syield\sfinally\s{puts\sok}\r\n%\srename\sfoo\s{}\r\n\r\n%\snamespace\seval\sfoo\s{\scoroutine\sfoo\stry\syield\sfinally\s{puts\sok}\s}\r\n%\snamespace\sdelete\sfoo\r\n\r\nDelete\straces\sdo\sfire,\sproviding\sa\ssort\sof\sworkaround:\r\n\r\n%\scoroutine\sfoo\sapply\s{{{t\s0}}\s{\r\n\s\s\s\strace\sadd\svariable\st\sunset\s{puts\sok;\slist}\r\n\s\s\s\syield\r\n}}\r\n%\srename\sfoo\s{}\r\nok\r\n\r\nArguably\sthis\smight\snot\sbe\sa\sbug,\sbut\sit\srenders\s[try\s..\sfinally]\sunreliable\r\nfor\sresource\sdeletion\sin\sthe\spresence\sof\scoroutines.\r\n\r\n\r\nMiguel's\sprevious\scomments\sfrom\sthe\schat:\r\n\r\n2015-08-09:\r\n\r\n<aspect>\s%\scoroutine\sc\stry\syield\sfinally\s{puts\sok};\srename\sc\s{}\s\s\s;#\sno\soutput\r\n<aspect>\sthat\smakes\sdeleting\scoroutines\s..\sproblematic\r\n<aspect>\sdelete\straces\sfire\sthough:\r\n<aspect>\s%\scoroutine\sc\sapply\s{{{t\s0}}\s{trace\sadd\svariable\st\sunset\s{puts\sok;\r\n\s\s\s\s\s\s\s\s\slist};\syield}};\srename\sc\s{}\s\s\s;#\semits\s"ok"\r\n\r\n<miguel>\swhat\sis\sproblemtic\sabout\sdeleting\scoroutines?\r\n<miguel>\sthey\sself-delete\swhen\sthey\sreturn;\syou\scan\sdelete\sthem\sas\snormal\r\n\s\s\s\s\s\s\s\s\scommands\sotherwise\s-\seven\sfrom\swithin\r\n<miguel>\sohhh\s...\sthe\sfinally\snever\sexecuted,\sright\s...\swill\slook\sinto\sit\r\n<miguel>\s(possibly\sa\sproblem\salso\sfor\s[interp\scancel],\sas\sthey\sshare\sthe\r\n\s\s\s\s\s\s\s\s\smechanism\siirc)\r\n<miguel>\sit\sis\sa\sfundamental\sproblem\s-\sthe\sclassic\sinvincible-force\svs\r\n\s\s\s\s\s\s\s\s\sunmovable-object:\s"cancel\severything\sno\smatter\swhat"\svs\s"before\r\n\s\s\s\s\s\s\s\s\scanceling\syou\sHAVE\sto\sdo\sthis\sone\sthing\s(which\smay\srequire\sinfinite\r\n\s\s\s\s\s\s\s\s\sresources)"\r\n<miguel>\s(at\sleast\sin\sthe\s[interp\scancel]\sversion)\r\n<miguel>\s%\stry\s{interp\scancel\s-unwind}\sfinally\s{puts\sok}\r\n<miguel>\seval\sunwound\r\n\s*\smiguel\sfinds\sthis\snot\strivial\sat\sall\r\n<miguel>\sthe\sproblem\sis\sthat\sthe\sfinally\sclause\sWILL\sget\sexecuted\sRIGHT\sAFTER\s\r\n\s\s\s\s\s\s\s\s\sthe\stry\sclause\sfinishes\s-\swhich\shappens\sto\sbe\sNEVER\sin\saspect's\ssetup\r\n\r\n\r\n2015-11-11:\r\n\r\n<miguel>\sI\shave\sa\svague\srecollection\sthat\swe\stalked\sabout\sit,\sand\sthat\sI\sthought\r\n\s\s\s\s\s\s\s\s\s'not\sa\sbug'\s...\r\n<miguel>\s...\sfinally\smeaning\s'before\sthis\scommand\sreturns',\sand\syour\sops\smaking\r\n\s\s\s\s\s\s\s\s\ssure\sthat\sthe\scommand\sin\squestion\snever\sreturned\s...\r\n<miguel>\s...\sso\sthat\s'never'\ssatisfies\s'before\sthe\scommand\sreturns'
J foundin 8.6.4
J is_private 0
J login aspect
J priority 5\sMedium
J private_contact a0e4455685fad6d7c7fc63ae05f16454df49fdf3
J resolution None
J severity Minor
J status Open
J submitter aspect
J subsystem 60.\sNRE\sand\scoroutines
J title deleting\sa\scoroutine\sbypasses\stry..finally\shandlers
J type Bug
K 39bb9b3ebb5ea83c4037980750b2c7a8929ff624
U aspect
Z dd2ef168b7fb0a7fcc1207eb4b7b958c