我正在阅读 JDK 7 文档 ( here ) 中有关 channel 的内容,并偶然发现了这个:
Multiplexed, non-blocking I/O, which is much more scalable than thread-oriented, blocking I/O, [...]
是否有关于为什么会这样的简单解释?
最佳答案
因为线程堆栈通常比支持异步 I/O 连接所需的数据结构大得多。此外,调度数千个线程效率低下。
关于java - 为什么是 "Multiplexed, non-blocking I/O, [..] much more scalable than thread-oriented, blocking I/O"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9057504/