For Programmers: Free Programming Magazines  


Home > Archive > Tcl > March 2008 > Re: serving a file to a client --- background fcopy read fileevent event puts socket









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: serving a file to a client --- background fcopy read fileevent event puts socket
Alan Anderson

2008-03-28, 10:23 pm

User-Agent: MT-NewsWatcher/3.4 (PPC Mac OS X)
Date: Fri, 28 Mar 2008 20:32:39 -0400
Message-ID: <aranders-16BB28.20323928032008@comcast.dca.giganews.com>
Lines: 18
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 98.223.14.228
X-Trace: sv3-e4sg87E2GNH3Ze5Y/Usn9Tb9/ HbkvPZ3swxuxXkKwy9LEx+KxY4ByTjYlytdaF7XG
ThcsxEKFK/xP/ X!KPduq3BKeLq7qCKXpwgtG79YMKhacdTwjsiLMN
/ hrQTcKlOEOKF32IIF+lql88o33HJ5M3u5Lc8L!ZO
9kW0WWGT0sp8/lKPxS/b/B9hZZERLxgtuliS3n+0m7
X-Complaints-To: abuse@comcast.net
X-DMCA-Complaints-To: dmca@comcast.net
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.37
Bytes: 2293
Xref: number1.nntp.dca.giganews.com comp.lang.tcl:294736

In article
<3c69be6e-ce92-4f23-9103-48da5f1fbdda@d4g2000prg.googlegroups.com>,
vitick@gmail.com wrote:

> It looks like the only way to reliably do what I was trying to do is
> to learn the Threads extension of TCL.


May I propose a better way? Learn how to work *with* the event loop
rather than fighting it. Start small. Try doing one thing, and post
here your solution. If feedback from some of the more experienced folk
here is positive, add one more thing, post here, repeat.

Based on the code you posted already, it's likely that feedback will
take the form of constructive suggestions on what to change in order to
make it work better. For example, I can think of no good reason *ever*
to write an infinite loop in an interactive Tcl application. I think
you might find that there is a teeny bit of misunderstanding on your
part regarding the "proper" way to do event-driven programming.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com