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
新手上路,麻烦大佬帮个忙解释下。我自己实践了下,不会错乱。 单个请求中间件执行顺序可以理解 koa2底层还是调用node自带的http, creatServer的回调方法,参数有req和res。 并发请求来到服务器时,先到http.createServer(this.callback()),然后每个请求分别走自己的callback(),互不干扰且是异步的。并发请求导致各自callback()都在运行,每个callback()都在打印日志,感觉会乱。
The text was updated successfully, but these errors were encountered:
并发,日志打印会交错的。异步io,按宏任务队列执行了
Sorry, something went wrong.
No branches or pull requests
新手上路,麻烦大佬帮个忙解释下。我自己实践了下,不会错乱。
单个请求中间件执行顺序可以理解
koa2底层还是调用node自带的http, creatServer的回调方法,参数有req和res。
并发请求来到服务器时,先到http.createServer(this.callback()),然后每个请求分别走自己的callback(),互不干扰且是异步的。并发请求导致各自callback()都在运行,每个callback()都在打印日志,感觉会乱。
The text was updated successfully, but these errors were encountered: