On Mon, Mar 31, 2014 at 5:01 PM, trifle menot <[email protected]> wrote:
> On Mon, Mar 31, 2014 at 11:17 PM, Philip Guenther <[email protected]> wrote:
>
>> You haven't convinced me the design needs fixing, nor have you proved
>> that the goal that you (sorta) describe can't already be solved with
>> the existing APIs.
>
>> "What problem are you trying to solve?"
>
> a) set VMIN = 250; don't read() very small blocks during bulk transfers
> b) set VTIME = 1; never wait more than 0.1 seconds for read() to return

No!  You're saying "I want to solve a problem using VMIN and VTIME,
but they don't solve my problem.  Should we change them?"  That's the
WRONG QUESTION.

"I'd like to gets these screws into my table, but hammering doesn't
seem to do it.  Should we change how hammers work?"


> I found a worst case scenario that violates (b). I proved it by
> experiment and clearly described it. Not "sorta."
>
> With the existing design you cannot eliminate the worst case. But
> maybe I'm the only one who cares.

I *sounds* like the problem you're trying to solve** is some thing like
     I want to efficiently read data from a serial line, returning
whenever at least
     250 bytes are available or when more then 0.1s has passed.
     If no data is received, it should still return after 0.1s.

Is that an accurate description of what you're actually trying to do?
Do you see the difference between that description and what you wrote?


Philip Guenther


** or maybe just have imagined as as possible scenario but not
something you're really trying to do?  Your posts make it sound like
this is a hypothetical and not something you're actually facing.

Reply via email to