Thanks for taking the trouble.
A tip for nonblocking_readline: the time calculations get simpler if you introduce a variable “deadline”:
* deadline = start + timeout * “now < start - timeout” becomes “now < deadline” * “timeout - (now - start)” becomes “deadline - now”
(Both in their way involve computing the time remaining, but I'm not sure that making that explicit as well makes things any better.)
Jeroen
« Back to merge proposal
Thanks for taking the trouble.
A tip for nonblocking_ readline: the time calculations get simpler if you introduce a variable “deadline”:
* deadline = start + timeout
* “now < start - timeout” becomes “now < deadline”
* “timeout - (now - start)” becomes “deadline - now”
(Both in their way involve computing the time remaining, but I'm not sure that making that explicit as well makes things any better.)
Jeroen