Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Feb 2, 2019

Ref:#1804

@nodejs/nodejs-cn

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直译 饿死 不够生动形象。。。 递归更像撑死。

直接说 阻塞I/O 会不会好一些

Copy link
Author

@ghost ghost Feb 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I/O调用因为异步轮询不断调用process.nextTick()始终得不到调用,所以始终处于“饥饿”状态,这是对的。而是说时间轮询队列被撑死了。
我们等一下其它人看法吧,我通读此文感觉这里的确是“饿死”,是说顺序执行的I/O始终得不到机会执行。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原文:

This can create some bad situations because it allows you to "starve" your I/O by making recursive process.nextTick() calls, which prevents the event loop from reaching the poll phase.

IMHO, 我是觉得没什么太大问题 :)

@ghost ghost requested a review from ZYSzys February 2, 2019 11:52
Copy link
Member

@ZYSzys ZYSzys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果没理解错的话,event loop 应该翻译成 事件循环 吧。

Copy link
Member

@ZYSzys ZYSzys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ghost ghost merged commit c53bc56 into nodejs:master Feb 3, 2019
@ghost ghost deleted the nextTick branch February 3, 2019 02:38
ghost pushed a commit that referenced this pull request Feb 3, 2019
Because of the missing submission, we have to re-submit them together.

Ref 1: #2028,
Ref 2: #2026.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants