| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| | |
generation, example:
tclsh -c "proc test {} {after 1000 test}; test; vwait infinite"
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
real-time"): because we use monotonic time in all wait functions, so to avoid too long wait by the absolute timers (to be able to trigger it) if time jumped to the expected absolute time, just let block for maximal 1 second if absolute timers available.
test-cases: time-jumps (TIP #302) test covered now.
Note: on some platforms it is only possible if the user has corresponding privileges to change system date and time.
Ex.: sudo LD_LIBRARY_PATH=. ./tclsh ../tests/timer.test -match timer-20.*
|
| |
| |
| |
| |
| |
| |
| | |
windows and unix now, TIP #302 fully implemented now);
Usage of monotonic time instead of adjustment via timeJump/timeJumpEpoch is more precise and effective.
New sub-command "clock monotonic" to provide monotonic time facility for tcl-level.
|
| |
| |
| |
| |
| |
| | |
event (of the same generation), it was marked (be sure it marked to immediate execution in corresponding checkProc only).
tclIO: scheduled event rewritten using Tcl_Event instead of timer event (IO is not timer, e. g. executed also by usage of `vwait -notimer ...`, etc).
|
| |
| |
| |
| | |
socket-2.12 (busy prompt timer, unexpected too early timer event, wrong timer-marker usage)
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
handling, a bit faster, etc.)
|
| | |
|
| |
| |
| |
| | |
timeJump/timeJumpEpoch
|
| |
| |
| |
| | |
timeJump/timeJumpEpoch
|
| |
| |
| |
| | |
else?)...
|
| |
| |
| |
| | |
calibration? something else?)...
|
| |
| |
| |
| | |
retrieving via internal representation (ignore foreign events), test cases extended.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
avoid busy-wait if the rest of wait-time too small and can be neglected);
TMR_RES_TOLERANCE can be defined to use wait-tolerance on *nix platforms (currently windows only as relation resp. deviation between default timer resolution 15.600 in exact milliseconds, means 15600/15000 + small overhead);
Decreasing of TMR_RES_TOLERANCE (up to 0) makes tcl more "RTS" resp. NRT-capable (very precise wait-intervals, but more CPU-hungry).
|
| | |
|
| |
| |
| |
| | |
non-blocking wait for event - if block-time set outside an event source traversal, use it as timeout, so can return with result 0 (no events);
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
"vwait ?options? ?timeout? varname".
some small improvements and fixing:
- Tcl_DoOneEvent can wait for block time that was set with Tcl_SetMaxBlockTime outside an event source traversal,
and stop waiting if Tcl_SetMaxBlockTime was called outside an event source (another event occurs and interrupt waiting loop), etc;
- safer more precise pre-lookup by options (use TclObjIsIndexOfTable instead of simply comparison of type with tclIndexType);
test cases extended to cover conditional "vwait" usage;
|
| |
| |
| |
| |
| |
| |
| | |
(introduced threshold to prevent sourcing resp. waiting for new events by no-wait).
[enhancement] new event type introduced: TCL_ASYNC_EVENTS, command "update" becomes options to process only specified types, resp. to bypass some event types (including -idle/-noidle that in opposite to "idletasks" does not included window events);
test cases extended.
|
| |
| |
| |
| |
| |
| | |
using timer marker in the queue and direct call of TclServiceTimerEvents if marker reached (instead of continuous adding handler event, polling it in the queue and removing hereafter);
this provides double performance increase in the service cycle;
|
| |
| |
| |
| |
| |
| |
| |
| | |
faster now);
[win] prevent listen using PeekMessage twice, and no wait anymore for too short timeouts (because windows can wait too long), compare 0µs with up-to 100µs overhead within MsgWaitForMultipleObjectsEx;
[bad behavior] process idle events only as long as no other events available (now TclPeekEventQueued will be used to check new events are available in service idle cycle);
[enhancement] new option "noidletasks" for command "update", so "update noidle" means "process all events but not idle";
|
| |
| |
| |
| |
| |
| | |
that should be executed immediately (no time);
normalizes timer, prompt and idle events structures using common TimerEntry structure for all types;
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
because changes the blocking time, also if TCL_TIMER_EVENTS|TCL_IDLE_EVENTS not set), so let do that within Tcl_DoOneEvent cycle only (we have registered an event source).
[performance] optimization for "after 0" as immediately execution without time (invoke as soon as possible) - generation and invocation of such timers twice faster now.
[performance] leave handler-event in the queue as long as pending timers still available (with expired time or immediate timers) by generation lock, resp. changed/not invalidated timer-queue) - so fewer event/allocations and guarantee to be executed within the next event cycle;
|
| |
| |
| |
| |
| |
| | |
pointer to timer/idle event, used for fast access to the "after" event (cancel, info etc.);
test cases extended to cover it additionally
|
| |
| |
| |
| | |
lists, prevents allocating memory twice for the "after" events (use memory inside timer/idle event for the "after" structure), etc.
|
| |
| |
| |
| | |
linked list, because requires handling from both ends of the list)
|
|\ \
| |/
| |
| |
| |
| | |
macros using Tcl_NewIntObj, Tcl_DbNewLongObj and Tcl_SetIntObj.
Starting with Tcl 8.5, this is exactly the same, it only eliminates code duplication.
Eliminate use of NO_WIDE_TYPE everywhere: It's exactly the same as TCL_WIDE_INT_IS_LONG
|
| | |
|
| |
| |
| | |
conversation with Alexandre Ferrieux.
|
| |
| |
| |
| | |
API.
|
| | |
|
| |
| |
| | |
rest of Tcl source code. No ABI change. API change *should* be harmless.
|
|\ \
| |/
| | |
cause more harm than good. Purged them (except in zlib files).
|
| |\
| | |
| | | |
more harm than good. Purged them.
|
| | |
| | |
| | | |
more harm than good. Purged them.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
attempted to store the assoc data in the client data; the
optimisation caused a bug that [after] would overwrite
its imports. [Bug 1016167]
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* generic/tclFCmd.c: null dereference flagged by clang static
* generic/tclProc.c: analyzer.
* generic/tclTimer.c:
* generic/tclUtf.c:
* generic/tclExecute.c: silence false positives from clang static
* generic/tclIO.c: analyzer about potential null dereference.
* generic/tclScan.c:
* generic/tclCompExpr.c:
|
| | |
| | |
| | |
| | |
| | | |
- some internal const decorations
- spacing
|
| | |
| | |
| | |
| | | |
etc.)
|