Skip to content
Tcl Source Code History Of Ticket dbafd8235cf75260
Login

History Of Ticket dbafd8235cf75260

Artifacts Associated With Ticket dbafd8235cf75260

  1. Ticket change [043c6eb52c] (rid 234343) by pooryorick on 2024-10-18 08:40:19:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. 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>
      
    5. foundin initialized to: "trunk"
    6. is_private initialized to: "0"
    7. login: "pooryorick"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "6ad13b180abb940a7b8a63d19ec70f064b0e6b2b"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "pooryorick"
    14. subsystem initialized to: "60. NRE and coroutines"
    15. title initialized to:
      coroutine, vwait, and try == no background error handler
      
    16. type initialized to: "Bug"
  2. Ticket change [a58b4ea2ee] (rid 234345) by sebres on 2024-10-18 10:28:01:

    1. closedate changed to: "2460601.93612462"
    2. closer changed to: "sebres"
    3. 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>
      
    4. login: "sebres"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"