Re: TIP #287: Add a Commands for Determining Size of Buffered Data
- From: Andreas Leitgeb <avl@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: 15 Dec 2006 17:31:14 GMT
Michael A. Cleverly <michael@xxxxxxxxxxxx> wrote:
Actually no.
Without having returned to the event loop (presuming there isn't an
[update] between your [gets] and [chan pending]) and without another
attempted input operation (another call to [gets] or [read]) then the data
will be buffered at the OS level, but not yet read/seen/known to Tcl.
Oh, that of course makes my comment moot.
If that were the case then [fblocked] would have always been a very
race-condition-prone bad hack too. But it isn't.
Actually, I never used [fblocked], but then I never
queried non-blocking channels for more than gets' return
value (being >=0 or not) and [eof]. I never came into
the situation of having a use for the information provided
by [fblocked], yet.
Nevertheless, I'd find a maxSize feature for [gets] much more
programmer-friendly than the solution you offered, despite
that your solution works right now, whereas the maxSize
feature would require a TIP to be written, accepted and
implemented. :-)
.
- Follow-Ups:
- Re: TIP #287: Add a Commands for Determining Size of Buffered Data
- From: Michael A. Cleverly
- Re: TIP #287: Add a Commands for Determining Size of Buffered Data
- References:
- TIP #287: Add a Commands for Determining Size of Buffered Data
- From: Fredderic
- Re: TIP #287: Add a Commands for Determining Size of Buffered Data
- From: Michael A. Cleverly
- Re: TIP #287: Add a Commands for Determining Size of Buffered Data
- From: Andreas Leitgeb
- Re: TIP #287: Add a Commands for Determining Size of Buffered Data
- From: Michael A. Cleverly
- TIP #287: Add a Commands for Determining Size of Buffered Data
- Prev by Date: Re: Why I need to click twice to destroy a top level window?
- Next by Date: Re: errorCode [was: Re: TIP #287: Add a Commands for Determining Size of Buffered Data]
- Previous by thread: Re: TIP #287: Add a Commands for Determining Size of Buffered Data
- Next by thread: Re: TIP #287: Add a Commands for Determining Size of Buffered Data
- Index(es):