26

阿里面试题BIO和NIO数量问题附答案和代码

 5 years ago
source link: https://juejin.im/post/5c8aea1df265da2de33f6a09
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
一、问题 BIO 和 NIO 作为 Server 端,当建立了 10 个连接时,分别产生多少个线程? 答案: 因为传统的 IO 也就是 BIO 是同步线程堵塞的,所以每个连接都要分配一个专用线程来处理请求,这样 10 个连接就会创建 10 个线程去处理。而 N

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK