You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Damon Courtney <da...@your.unreality.com> on 2001/11/21 05:24:25 UTC

flush

Ok,

    It appears that flushing stdout is not having any affect.  I tried using
it in a for loop, just spitting out numbers and flushing after each one, and
it has no affect.  Is there something we're not doing right?  Do we need to
put the hflush command back in to get what we need?

D


Re: flush

Posted by "David N. Welton" <da...@dedasys.com>.
Ok, I am not sure we are there %100 of the way, but I have it working.
I set the buffer to be huge (100000), and make the outputproc print
headers and flush anything out to apache (apache's output procedures
buffer as well).

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: flush

Posted by Damon Courtney <da...@your.unreality.com>.
> Ok, well 'flush stdout' should have that effect, as it stands right
> now.

    Yeah, that works.  I tried a page with calling flush stdout at the
end before calling 'headers,' and it worked beautifully (failed that is).
I then tried the same page without the flush, and the headers command worked.

> We can kill them - I put them in because I had hoped to have a
> flushproc:-(

    Ok.  I killed 'em.  I'll commit shortly with a few other little things.

D


Re: flush

Posted by "David N. Welton" <da...@dedasys.com>.
Damon Courtney <da...@your.unreality.com> writes:

> > This means that after each chunk of <? ?>, we aren't flushing.
> > That's a simple matter of writing in the 'flush' commands behind
> > or before the puts statements in parser.c.  I'm not sure -
> > explicit flush, or not?

>     I don't know.  In NWS, I don't think we ever flushed.  We let
> Apache buffer it 'til it felt like flushing, or until the user
> called flush_page explicitly.

Ok, well 'flush stdout' should have that effect, as it stands right
now.

>     It kinda' confuses new users who want the page to show up
> without having to load the whole thing, but we can make a note
> somewhere in an FAQ about how it's done.

Agreed.

>     Also, the ApacheChan struct definition in channel.c has 2 extra
> NULLs at the end, and I'm getting warnings about it.  Not that it
> really matters.  Are you compiling against a newer versio of Tcl
> that uses those?

We can kill them - I put them in because I had hoped to have a
flushproc:-(


-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: flush

Posted by Damon Courtney <da...@your.unreality.com>.
> This means that after each chunk of <? ?>, we aren't flushing.  That's
> a simple matter of writing in the 'flush' commands behind or before
> the puts statements in parser.c.  I'm not sure - explicit flush, or
> not?

    I don't know.  In NWS, I don't think we ever flushed.  We let Apache
buffer it 'til it felt like flushing, or until the user called flush_page
explicitly.

    It kinda' confuses new users who want the page to show up without
having to load the whole thing, but we can make a note somewhere in an
FAQ about how it's done.

    Also, the ApacheChan struct definition in channel.c has 2 extra NULLs
at the end, and I'm getting warnings about it.  Not that it really matters.
Are you compiling against a newer versio of Tcl that uses those?

D


Re: flush

Posted by "David N. Welton" <da...@dedasys.com>.
This means that after each chunk of <? ?>, we aren't flushing.  That's
a simple matter of writing in the 'flush' commands behind or before
the puts statements in parser.c.  I'm not sure - explicit flush, or
not?

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: flush

Posted by "David N. Welton" <da...@dedasys.com>.
davidw@dedasys.com (David N. Welton) writes:

> Damon Courtney <da...@your.unreality.com> writes:
> 
> >     It appears that flushing stdout is not having any affect.  I
> > tried using it in a for loop, just spitting out numbers and flushing
> > after each one, and it has no affect.  Is there something we're not
> > doing right?  Do we need to put the hflush command back in to get
> > what we need?
> 
> Because we don't have a 'flushproc' yet in the channel code:-) I'll
> work on that today.

Urk...

FLUSHPROC                                                         |
       The flushProc field is currently reserved for future  use. |
       It should be set to NULL.  FlushProc should match the fol� |
       lowing prototype: 

Hrm... let me look around a bit...
-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: flush

Posted by "David N. Welton" <da...@dedasys.com>.
Damon Courtney <da...@your.unreality.com> writes:

>     It appears that flushing stdout is not having any affect.  I
> tried using it in a for loop, just spitting out numbers and flushing
> after each one, and it has no affect.  Is there something we're not
> doing right?  Do we need to put the hflush command back in to get
> what we need?

Because we don't have a 'flushproc' yet in the channel code:-) I'll
work on that today.

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/