Skip to content
Tcl Source Code History Of Ticket 1221395fffffffff
Login

History Of Ticket 1221395fffffffff

Artifacts Associated With Ticket 1221395fffffffff

  1. Ticket change [5c71eae06e] (rid 115301) by nobody on 2005-06-15 17:29:56:

    1. assignee initialized to: "hobbs"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Tcl 8.5a3, Windows 2000
      
      It is impossible to stop interpreter from outside ('master' 
      C code) by using Tcl_LimitSetTime when script is 
      executing vwait command. The following code was 
      written in 'master':
      
      limitTime.usec = 1;
      limitTime.sec = 0;
      Tcl_LimitSetGranularity( interp, TCL_LIMIT_TIME, 1 );
      Tcl_LimitTypeSet( interp, TCL_LIMIT_TIME );
      Tcl_LimitSetTime( interp, &limitTime );
      Tcl_LimitCheck( interp );
      
      and doesn't work (I suspect that Tcl_LimitTypeSet() 
      should be enough indeed)
      
      I've modified TCL sources a bit and it started to work but I 
      don't know TCL sources well, so this could be a bad way.
      
      In tclInterp.c, Tcl_LimitCheck()   (Send alert each time 
      limit check is hit)
      ...
      >      Tcl_Preserve(interp);
      >      RunLimitHandlers(iPtr->limit.timeHandlers, interp);
      
      +      Tcl_ThreadAlert( NULL );
      
      >      if (iPtr->limit.time.sec > now.sec ||
      ...
      
      In tclNotify.c, Tcl_ThreadAlert()   (support for 'broadcast' 
      events, without exact threadId known)
      ...
      >    for (tsdPtr = firstNotifierPtr; tsdPtr; tsdPtr = tsdPtr-
      >nextPtr) {
      +if ((threadId == NULL) || (tsdPtr->threadId == threadId)) 
      {
      >    if (tclStubs.tcl_AlertNotifier) {
      ...
      
      And the last thing is that even after all that done 
      Tcl_WaitForEvent returns 0 and Tcl_DoOneEvent() do not 
      warns vwait about changes happened, so I had to make 
      Tcl_WaitForEvent always return 1.
      
      I believe there can be a graceful solution of this problem 
      (if there IS problem).
      
      nyrl at mail dot ru
      
    4. foundin initialized to: "obsolete: 8.5a3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "20. [interp]"
    10. title initialized to: "Cannot break 'vwait' with Tcl_LimitSetTime"
    11. type initialized to: "Bug"
  2. Ticket change [6fcd183c7b] (rid 100373) by dkf on 2005-06-16 05:42:09:

    1. assignee changed to: "dkf"
    2. priority changed to: "8"
  3. Ticket change [b576d6abc6] (rid 125247) by dkf on 2005-06-17 21:28:27:

    1. closedate changed to: "2005-06-17T14:28:27"
    2. closer changed to: "dkf"
    3. icomment:
      Logged In: YES 
      user_id=79902
      
      Turns out to have been a problem with [after]'s handling of
      time limit mathematics. Fixed in HEAD.
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dkf"