Node.js 官方关于非阻塞的文档中,addtional javascript 是什么含义,有没有实例?
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 回复
nodejs中还真没啥阻塞api, 用浏览器举例子吧
alert('') // 这是 non-JavaScript operation, 用户不点确定, 不会执行下一行代码
console.log('hello world') // 这是 additional JavaScript, 即: 未来/后面即将要执行的js