Overview
| Artifact ID: | 4b37062d841a07bf117ff90e165480ace1e8beaf525c9dec77bffc2e091319e4 |
|---|---|
| Ticket: | a11678b75917f88a53e22d487728a35367356e56
documentation improvement: "after 0 cmd" |
| User & Date: | sebres on 2022-08-18 11:19:13 |
Changes
- icomment:
> *"after 0 cmd" puts the command in front of the event queue. Other already registered events will run after this event.* This is not quite correct. Basically when adding to the queue it considers other timers there, so in case other events with 0 are already available, it would add new event after them and not in head of the queue. Also it is important to consider the "epoch" of event (an event created during evaluation of another event will be executed firstly by the next round of event cycle evaluation). Negative offset is the same as 0. Regarding `after idle [list after 0 doOneStep]`, it will guarantee that `doOneStep` will be evaluated in the second round of event cycle, but firstly after the idle round was done too. It is a kind of retarding of events (surely not the best one) either because of the nested `update`s somewhere or because of missing filter functionality by `update` or `vwait` (e. g. impossibility to invoke `update -timer` or `update -noidle` like implemented in RFE [fdfbd5e10](./tktview?name=fdfbd5e10)). Fundamentally although it can be helpful sometimes, but may be a bit worse concept to rely on timers in this way. It could be sometimes also a sign that a code doesn't register or handle events correctly (instead of count on some state it trust in a time-related evaluation).
- login: "sebres"
- mimetype: "text/x-markdown"