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
方案
借助 Generator 手动执行实现异步。需要自动执行的机制:
co(function* gen() { yield Thunk 函数 // 回调中交回执行权 yield Promise 函数 // then 中交回执行权 }).then(...)
async/await 实现异步编程
await
async
The text was updated successfully, but these errors were encountered:
No branches or pull requests
方案
借助 Generator 手动执行实现异步。需要自动执行的机制:
async/await 实现异步编程
await
后面可以是 Promise 对象和原始类型的值async
函数返回的是 Promise 对象The text was updated successfully, but these errors were encountered: