On Mon, Oct 10, 2016 at 2:59 AM, Martin Teichmann
This is why I got my idea to flag such calls. Unfortunately, I realized that it is nearly impossible to tell whether a read call is blocking or not. We would need to know whether the file descriptor we read from was created as non-blocking, or whether it was an actual file, and how fast the file storage is for this file (SSD: maybe fine, Network: to slow, magnetic disk: dunno). All of this is unfortunately not a Python issue, but an issue for the underlying operating system.
Yeah, it really doesn't help that a synchronous network query to a remote SSD-backed database can easily be lower latency than a synchronous local disk read to spinning media, yet the fact that we have async network APIs but no standard async disk APIs means that we would inevitably find ourselves warning about the former case while letting the latter one pass silently... -n -- Nathaniel J. Smith -- https://vorpus.org