3
关于 Non-Blocking 的终极一问
source link: https://www.v2ex.com/t/863117
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.
- 调用涉及 IO 任务的线程没有被阻塞
- 调用涉及 IO 任务的线程没有被阻塞,IO 任务底层是新开线程来等待 IO ,即实际有线程被阻塞
- 调用涉及 IO 任务的线程没有被阻塞,IO 任务底层是基于 Eventloop ,实际最多一条线程被阻塞
上述三种情况哪种才叫 Non-Blocking ?
因为我看了很多文档,不同的文档在上面三种不同的场景都用到了 Non-Blocking ,让我很疑惑
比如 https://projectreactor.io/docs/core/release/reference/#_blocking_can_be_wasteful ,So the parallelization approach is not a silver bullet
这句话就跟 reactor-core 没有基于 NIO ( Eventloop )这个矛盾了,然后它又说自己是 Non-Blocking
又比如 https://github.com/ReactiveX/RxJava/issues/5260 ,这里说 RxJava 不是实际的 Non-Blocking
请大佬解答一下上述三种情况哪种才叫 Non-Blocking ?
这个问题
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK