Artifacts Associated With Ticket dbafd8235cf75260
Ticket change [043c6eb52c] (rid 234343) by pooryorick on 2024-10-18 08:40:19:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
In the following script, the background error handler is not invoked. <code><verbatim> proc p1 {} { error {error 1} } after 0 [list coroutine c1 ::apply [list {} { variable done try p1 finally { set done 1 } error {error 2} } [namespace current]]] vwait done </verbatim></code> - foundin initialized to: "trunk"
- is_private initialized to: "0"
- login: "pooryorick"
- priority initialized to: "5 Medium"
- private_contact initialized to: "6ad13b180abb940a7b8a63d19ec70f064b0e6b2b"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "pooryorick"
- subsystem initialized to: "60. NRE and coroutines"
- title initialized to:
coroutine, vwait, and try == no background error handler
- type initialized to: "Bug"
Ticket change [a58b4ea2ee] (rid 234345) by sebres on 2024-10-18 10:28:01:
- closedate changed to: "2460601.93612462"
- closer changed to: "sebres"
- icomment:
This is expected behaviour - since done is set (in finally), vwait will stop before the idle event of background error takes place. This has nothing to do with coro, NRE etc - it is simply how vwait (and background error handler) work.<br/> Simplified example illustrating this: <code><pre> % after 0 { set done 1; error test }; vwait done % update test while executing "error test " ("after" script) </pre></code> - login: "sebres"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Invalid"
- status changed to: "Closed"