Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 22cadeb34ed7fe1a937ff51e4a4ffee4be254400
Ticket: 1085023fffffffffffffffffffffffffffffffff
Interp limit functionality with vwait call
User & Date: nobody on 2004-12-16 18:31:14
Changes

  1. icomment:
    Logged In: NO 
    
    This doesn't seems to work, TimerHandler call doesn't 
    seems to activate timeout check even with time 
    granularity 1.  Possible further problems - there are cases 
    when timeout limit check is called too rarely, so it can be 
    handy to force such a check each second. Imho, this can 
    be done by changing waiting loops (Tcl_Sleep and 
    Tcl_DoEvent) to do a limited wait, calling Tcl_CheckLimits 
    from time to time without checking time granularity.
    
    Also I've found a small bug with time limits. 
    Tcl_SetTimeLimit sets relative timeout while 
    Tcl_CheckLimits check absolute timeout. Changes in 
    Tcl_SetTimeLimit like
        Tcl_GetTime(&now);
        usec = iPtr->limit.time.usec + now.usec;
        iPtr->limit.time.sec += now.sec + usec / 1000000;
        iPtr->limit.time.usec = usec % 1000000;
        iPtr->limit.exceeded &= ~TCL_LIMIT_COMMANDS;
    works, but when You call 
        puts "Limit is: [ interp limit {} time ]"
    from script You'll get absolute timeouts, what can be 
    misguiding.
    
    [email protected]
    
    
  2. login: "nobody"
  3. mimetype: "text/plain"
  4. username: "nobody"