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

Re: [PATCH 3/8] xread_nonblock: add functionality to read from fds without blocking

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

Jeff King [off-list ref] writes:
Are we trying to protect ourselves against somebody _else_ giving us a
non-blocking descriptor? In that case we'll quietly spin and waste CPU.
Which isn't great, but perhaps better than returning an error.
I think I said it earlier in a message upthread.
Ahh, there is a difference if the file descriptor the caller feeds
strbuf_read_once() happens to be marked as nonblock.  read_once()
wants to return without doing the poll() in such a case.  Even
though this series would not introduce any use of a nonblocking file
descriptor, as a general API function, [4/8] must be prepared for
such a future caller, hence [3/8] is needed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help