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

[bug] P279 async asap queue 例子输出错误 #20

Open
ecuplxd opened this issue May 3, 2020 · 1 comment
Open

[bug] P279 async asap queue 例子输出错误 #20

ecuplxd opened this issue May 3, 2020 · 1 comment

Comments

@ecuplxd
Copy link

ecuplxd commented May 3, 2020

书上给的输出和说明一看就不一致了。

before schedule
queue
after schedule
async
asap

又因为 asap 使用的是 Micro Task,所以它的任务会抢在 async 之前完成。

@mofelee
Copy link

mofelee commented Jan 16, 2022

哈哈,这个的确是错了,我做实验证明 asap 是在 async 前打印的,不过有可能 js 引擎不同结果不一样。

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

No branches or pull requests

2 participants