3 ms·
I'm not primarily a Java developer and this use of "blocking" is very confusing to me. Outside of the Java world whether something is blocking or asynchronous i
by morelisp 6y ago
I'm not primarily a Java developer and this use of "blocking" is very confusing to me. Outside of the Java world whether something is blocking or asynchronous is a property of the API, and usually obvious from the method signature (e.g. if it returns a future or accepts a callback it's asynchronous; if it has a timeout it's blocking, etc.). For example Go unary gRPC is certainly "blocking" as far as any code a user writes cares - both the server start/stop and the individual calls are completely synchronous on their goroutines. And this is also how the term is used in the Java gRPC documentation.
Instead here it seems to mean something more like "is capable of deadlocking if a thread pool is exhausted" or therefore roughly equivalent to "not lock-free". Is that correct? (But then the comments about `volatile` confuse me more - can you deadlock a thread with purely `volatile` access if your platform doesn't natively support it? That seems like a large failing of the JVM.)