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

【2022.8.19】事件循环更新 #61

Open
lkzwc opened this issue Aug 21, 2022 · 0 comments
Open

【2022.8.19】事件循环更新 #61

lkzwc opened this issue Aug 21, 2022 · 0 comments

Comments

@lkzwc
Copy link
Owner

lkzwc commented Aug 21, 2022

总结下事件循环

  • 所有同步任务在主线程上执行,形成一个执行栈
  • 主线程之外,还有一个任务队列,只要异步任务有了结果,就会将在任务队列中放置一个事件
  • 一旦执行栈中的同步任务执行完毕,系统就会读取任务队列,对应的异步任务,结束等待状态,进入执行栈执行
  • 主线程不断执行第三步

https://lkzwc.vercel.app/docs/event

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

1 participant