Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: da395d3e1aba8fe942096e783f70a0480a2c5014c32dfce4061a18b70de36b0e
Ticket: 570cb6afea12bc135f6c78afc0abae53a1918438
Not getting expected outut.
User & Date: jan.nijtmans on 2021-01-06 16:07:28
Changes

  1. assignee changed to: "jan.nijtmans"
  2. closedate changed to: "2459221.17185858"
  3. closer changed to: "jan.nijtmans"
  4. icomment:
    The "after" commands are only executed when an event loop is running. In your case, the "vwait" runs the event loop, so that's when the lappends happen.
    
    If you put an "update" just before the vwait, it hangs as expected:
    
    #tcl commands
    set x {}
    after 100 lappend x a
    after 200 lappend x b
    after 300 lappend x c
    after 700
    update
    vwait x
    set x
    
  5. login: "jan.nijtmans"
  6. mimetype: "text/x-fossil-wiki"
  7. resolution changed to: "Works For Me"
  8. severity changed to: "Cosmetic"
  9. status changed to: "Closed"