| Deutsch English Français Italiano |
|
<103juqc$3imgb$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Rich <rich@example.invalid>
Newsgroups: comp.lang.tcl
Subject: Re: Event loop and http::geturl
Date: Thu, 26 Jun 2025 17:08:29 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <103juqc$3imgb$1@dont-email.me>
References: <103cf0h$1glgk$1@dont-email.me> <103d93c$1q263$1@dont-email.me> <103dm05$1svqt$1@dont-email.me> <103ffab$2b701$1@dont-email.me> <103g70o$2k78v$1@dont-email.me> <103gdlo$2lnei$1@dont-email.me> <103hem3$2ua8s$1@dont-email.me> <103hptq$30q4s$1@dont-email.me> <103i951$33lgp$1@dont-email.me>
Injection-Date: Thu, 26 Jun 2025 19:08:29 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="22a579e026104c2fef217890330ad169";
logging-data="3758603"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19wTgLLD+gcQ525Kqud78Vq"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:NRYe2ZqrODSk312p8TLpG98fqnQ=
et99 <et99@rocketship1.me> wrote:
> On 6/25/2025 2:32 PM, Rich wrote:
>> Jonathan Kelly <jonkelly@fastmail.fm> wrote:
>>> proc queue {} {
>>> set ::input [open "|cat test.txt" r]
>>> fconfigure $::input -blocking 0 -buffering line
>>> fileevent $::input readable [list check $::input]
>>> }
>>
>> Curious why you are opening a pipe to cat, having cat read and print
>> the contents, and then consuming that, when you can just open
>> text.txt directly:
>>
>> set ::input [open test.txt r]
>>
>> And achieve the same result.
>
> I was also curious about this. But I'm also wondering why this is
> even event driven at all? Why not simply, in pseudo code:
My guess: the above was OP's "test case" code. The real code is
reading an Apache log file as Apache logs to the file, so 'event
driven' in that senario does make some sense.