We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
正确执行 nextTick延迟执行1 nextTick延迟执行2 setImmediate延迟执行1 强势插入 setImmediate延迟执行2
正确执行 nextTick延迟执行1 nextTick延迟执行2 setImmediate延迟执行1 setImmediate延迟执行2 强势插入
书中图 自己的执行结果
The text was updated successfully, but these errors were encountered:
书上这个错误是因为在 0.12 还是什么版本的时候,process.nextTick 和 setImmediate 底层更改了实现。因为这个地方的勘误会引起很大篇幅的改动,所以没有做,留到第二版再做把。
Sorry, something went wrong.
了解~谢谢朴老师的解答。
No branches or pull requests
书中书写的输出结果为
正确执行
nextTick延迟执行1
nextTick延迟执行2
setImmediate延迟执行1
强势插入
setImmediate延迟执行2
正确结果应为在macro task setImmediate 队列下的主函数都执行完毕后才调用 micro task 的 process.nextTick 吧
正确执行
nextTick延迟执行1
nextTick延迟执行2
setImmediate延迟执行1
setImmediate延迟执行2
强势插入
附图
书中图
自己的执行结果
The text was updated successfully, but these errors were encountered: