> > How do you distinguish, as a caller, blocking from long-running computation? > And what to do about it anyway? >
All file descriptors and syscalls in Go code are guaranteed to be used in a non-blocking fashion, and call sites are instrumented to yield to the scheduler in case the kernel returns EWOULDBLOCK. That doesn't hold if the code calls into foreign libraries which call into the kernel, but that's why Go developers have been trying as much as possible to rewrite everything in Go. With enough manpower, that's feasible. -- Stelian Ionescu
