Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: vitick@xxxxxxxxx
- Date: Fri, 28 Mar 2008 13:50:04 -0700 (PDT)
On Mar 28, 12:38 pm, Uwe Klein <uwe_klein_habertw...@xxxxxxxxxxx>
wrote:
vit...@xxxxxxxxx wrote:
On Mar 28, 10:58 am, Uwe Klein <uwe_klein_habertw...@xxxxxxxxxxx>
wrote:
vit...@xxxxxxxxx wrote:
On Mar 28, 10:32 am, vit...@xxxxxxxxx wrote:
After spending a lot of time trying to do a nonblocking transfer of a
large file with fcopy, I gave up on fcopy. I did come up with a
You never came across [fileevent] did you?
uwe
:) nothing like a dose of sarcasm to start a working day :)
Always at your service, Sir!
Well, there are a couple of issues:
vwait stacks, it does not work in parallel.
i.e any stacked vwait has to trigger to expose
the underlying vwaits.
This is an unpleasant situation at best.
Vwait works on variable change. Thus your
code sequence should never get further than the
entry to [vwait]
after $after_time [list set wait_var]
> vwait wait_var
>
next: you are vwaiting inside of a proc
on a variable change in local scope.
( no upvar, nor global statement )
but [after] expedites its payload in global scope
and your script only reads that var anyway.
( imho you should get a background error on this )
I am not clear how this works. But my guess is not
in the way you think it works.
On the other hand: I may be compleately wrong ;-)
uwe
Thanks Uwe,
You are right about stacking of vwaits. But they do seem to work on
local variables.
I was so excited about it. But it turns out that only ONE such code
instance will actually run alongside the regular file events. If I add
another one, one of them will suspend until the first one finishes.
Well, back to reality. At least I learned something new today. Thanks
again.
.
- References:
- serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: vitick
- Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: vitick
- Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: Uwe Klein
- Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: vitick
- Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- From: Uwe Klein
- serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- Prev by Date: Re: where is expand {@}?
- Next by Date: Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- Previous by thread: Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- Next by thread: Re: serving a file to a client --- background fcopy read fileevent event puts socket channel blocking nonblocking
- Index(es):