Skip to content
New issue

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

Koa 中异步方法的使用 | Hans Chan's Blog #41

Open
csbun opened this issue Jan 2, 2019 · 0 comments
Open

Koa 中异步方法的使用 | Hans Chan's Blog #41

csbun opened this issue Jan 2, 2019 · 0 comments

Comments

@csbun
Copy link
Owner

csbun commented Jan 2, 2019

http://csbun.github.io/blog/2014/09/koa-async-usage/

使用 Generator 简化异步回调12345678910111213var gen;function async() { setTimeout(function () { gen.next(100); });}function * genFn() { var res = yield async(); con

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant