Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 01/10] strbuf: Add strbuf_read_noblock

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:06:36

Jeff King [off-list ref] writes:
I actually wonder if callers who are _expecting_ non-blocking want to
loop in strbuf_read() at all.

strbuf_read() is really about reading to EOF, and growing the buffer to
fit all of the input. But that's not at all what you want to do with
non-blocking. There you believe for some reason that data may be
available (probably due to poll), and you want to read one chunk of it,
maybe act, and then go back to polling.
I think I could have gone to grab a cup of coffee instead of typing
another message that essentially said the same thing ;-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help