Java – why is “multiplexing, non blocking I / O, […] more scalable than thread oriented, blocking I / O”?
•
Java
I was reading the channel in the JDK 7 document (here) and came across:
Is there a simple explanation why?
Solution
"Blocking" means that the thread must wait for a period of time to make the resource available... This means that by definition, the thread will wait around the resource Non blocking avoids such things
In general, non blocking solutions are tricky, but they avoid resource contention, which makes scaling easy (that is to say, the point of the channel is to make this less difficult.)
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码