CNode

Node.js 官方关于非阻塞的文档中,addtional javascript 是什么含义,有没有实例?

问答
Ssdutwsl发布于5 年前最后回复5 年前3 回复2036 浏览0 收藏

Blocking is when the execution of additional JavaScript in the Node.js process must wait until a non-JavaScript operation completes. This happens because the event loop is unable to continue running JavaScript while a blocking operation is occurring.

查看回复

回复 (1)

N
netwjx#1·5 年前

nodejs中还真没啥阻塞api, 用浏览器举例子吧

alert('')  // 这是 non-JavaScript operation, 用户不点确定, 不会执行下一行代码
console.log('hello world')   // 这是 additional JavaScript, 即: 未来/后面即将要执行的js

参与回复
登录后即可参与回复。登录