Sujet : Re: too many nested evaluations (infinite loop?)
De : saitology9 (at) *nospam* gmail.com (saito)
Groupes : comp.lang.tclDate : 22. Jun 2025, 21:10:23
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <1039nvg$njco$1@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
On 6/22/2025 3:27 PM, Jonathan Kelly wrote:
But isn't the TCL event loop single threaded?
This is a good question. With event driven applications, you usually don't have a main line of thread that is executing constantly. In that case, yes, the events may not fire.
However, with such applications, events are fired and processed repeatedly. So they may indeed interfere with each other.
Here is a nice sample code. See how they intermingle:
proc timer1 {} {puts -nonewline .; after 100 timer1}
proc timer2 {} {puts TIMER....................; after 1000 timer2}
after 1000 timer2; after 100 timer1