1 Star 0 Fork 0

zhkch / fed-e-task-01-01

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
  1. 由于js是单线程的,在js执行环境中负责执行代码的线程只有一个,当需要执行耗时间的任务时,会造成阻塞,因此将任务的执行模式分为同步跟异步两种。异步任务交给幕后线程执行,当执行完毕后,会将异步任务的回调放到消息队列里面。当主线程执行完当前的所有任务后,把消息队列的第一个任务的回调拿出来执行,执行完毕继续取任务,如此循环就是一个eventLoop.

  2. 根据任务粒度,异步任务分为宏任务,微任务。微任务会在当前宏任务结束之前执行,解决了实时性的问题。

作业:

任务1:task1.js

任务2:task2.js

任务3:app.js

任务4: myPromise.js

Empty file

About

No description expand collapse
JavaScript
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
JavaScript
1
https://gitee.com/zhkch/fed-e-task-01-01.git
git@gitee.com:zhkch/fed-e-task-01-01.git
zhkch
fed-e-task-01-01
fed-e-task-01-01
master

Search

53164aa7 5694891 3bd8fe86 5694891