bxb100 / bxb100.github.io

This is my blog
https://blog.tomcat.run
MIT License
1 stars 0 forks source link

NIO 和 Reactor 理解(待补充) #26

Open bxb100 opened 1 year ago

bxb100 commented 1 year ago

NIO: NIO stands for non-blocking I/O

It work looks like this: image

NIO 这是个线程模型, 通常用于 socket 连接, 减少线程数量

Reactor 库的设计目的就是在构建异步管道时避免回调地狱深层嵌套代码, 属于 NIO 的拓展

对于 Loom 出来后, 这些都是可以忽略的

Reference