Artifacts Associated With Ticket 1085023fffffffffffffffffffffffffffffffff
Ticket change [a9e6ddde14] (rid 99234) by nobody on 2004-12-14 10:09:00:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- comment initialized to:
It seems that vwait will not break when timeout limit is hit. The following script does not stop: set testvar "" interp limit {} time -seconds 5 vwait testvar - foundin initialized to: "obsolete: 8.5a2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "50. Embedding Support"
- title initialized to: "Interp limit functionality with vwait call"
- type initialized to: "Bug"
Ticket change [9839b50b62] (rid 110571) by nobody on 2004-12-14 17:47:38:
- icomment:
Logged In: NO Small addition - first time this problem appeared when I tryed to break script execution from C code by setting further execution time to one second - result was the same. P.S. Probably it would be handy to have "Tcl_SetLimitExceeded" to break executing script [email protected]
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [fd2c48e7da] (rid 108373) by dgp on 2004-12-14 23:22:56:
- assignee changed to: "dkf"
- subsystem changed to: "20. [interp]"
Ticket change [cae230e8fd] (rid 95435) by dkf on 2004-12-15 01:58:26:
- icomment:
Logged In: YES user_id=79902 Yeah, I've known about this issue for a while. Not sure how to fix it yet though.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [81ffd3662b] (rid 117146) by dkf on 2004-12-16 00:53:49:
- icomment:
Logged In: YES user_id=79902 Examining what I've done so far, setting up a no-action timer with Tcl_CreateTimerHandler will be sufficient; that can be done at the same time as the creation of the time limit.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [22cadeb34e] (rid 130816) by nobody on 2004-12-16 18:31:14:
- 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] - login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [5fae60a52c] (rid 115860) by dkf on 2004-12-16 23:35:56:
- icomment:
Logged In: YES user_id=79902 There was a minor error (wrong comparison operator!) in the time limit evaluation code that made it postpone enforcing the limit until the end of the second. :^} Fixing blocking [after] is unpleasant, but fairly straight-forward. Fixing blocking [exec] (or other blocking IO) is beyond what I understand how to do at the moment. :^(
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [4b8aa483ba] (rid 126732) by dkf on 2004-12-17 02:39:31:
- closedate changed to: "2004-12-16T19:39:31"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Fixed [vwait], [update] and [after <num>] to be time-limit aware. The fix for [vwait] and [update] is elegant (a timer event that checks the limit at the time when the limit is expected to be exceeded) and the fix for blocking [after] is not (fragment the blocking wait!) but all cases should now work. Thanks for reporting this!
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"