Re: Event loop and http::geturl

Liste des GroupesRevenir à cl tcl 
Sujet : Re: Event loop and http::geturl
De : auriocus (at) *nospam* gmx.de (Christian Gollwitzer)
Groupes : comp.lang.tcl
Date : 27. Jun 2025, 15:35:08
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <103ma6s$6t7d$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Mozilla Thunderbird
Am 26.06.25 um 23:02 schrieb et99:
I wonder, if you are reading a file that is being written from another process, sort of like a "tail" program, doesn't tcl's [fileevent <channel> readable <script>] trigger constantly? Isn't this in effect a tight polling loop?
The underlying mechanism is select() or poll(). To my knowledge, this only works for pipes/sockets, not for files. The "tail -f" program runs stat() in a loop to see if the file date or size has changed.
On Linux, you could also use inotify (there is a Tcl package) to get callbacks when the file is changed
      Christian

Date Sujet#  Auteur
23 Jun 25 * Event loop and http::geturl17Jonathan Kelly
23 Jun 25 +- Re: Event loop and http::geturl1Jonathan Kelly
24 Jun 25 `* Re: Event loop and http::geturl15Rich
24 Jun 25  `* Re: Event loop and http::geturl14Jonathan Kelly
25 Jun 25   `* Re: Event loop and http::geturl13et99
25 Jun 25    `* Re: Event loop and http::geturl12et99
25 Jun 25     `* Re: Event loop and http::geturl11et99
25 Jun 25      `* Re: Event loop and http::geturl10Jonathan Kelly
25 Jun 25       `* Re: Event loop and http::geturl9Rich
26 Jun 25        `* Re: Event loop and http::geturl8et99
26 Jun 25         +* File processing (was Event loop and http::geturl)2Alan Grunwald
26 Jun 25         i`- Re: File processing (was Event loop and http::geturl)1Ralf Fassel
26 Jun 25         `* Re: Event loop and http::geturl5Rich
26 Jun 25          `* Re: Event loop and http::geturl4Jonathan Kelly
26 Jun 25           `* Re: Event loop and http::geturl3et99
27 Jun 25            `* Re: Event loop and http::geturl2Christian Gollwitzer
27 Jun 25             `- Re: Event loop and http::geturl1Ralf Fassel

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal