Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-study-front-share
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
yifu-study
front
yifu-study-front-share
Commits
e818189d
Commit
e818189d
authored
Sep 21, 2022
by
zhangshun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'异步编程中的Promise'
parent
93d37e31
Pipeline
#16814
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
异步编程中的Promise.md
source/_posts/异步编程中的Promise.md
+2
-0
No files found.
source/_posts/异步编程中的Promise.md
View file @
e818189d
...
...
@@ -6,6 +6,8 @@ tags:
-
Promise
author
:
张顺
---
## 简介
`Javascript`
异步编程先后经历了四个阶段,分别是
`Callback`
阶段,
`Promise`
阶段,
`Generator`
阶段和
`Async/Await`
阶段。
`Callback`
很快就被发现存在回调地狱和控制权问题,
`Promise`
就是在这个时间出现,用以解决这些问题,
`Promise`
并非一个新事务,而是按照一个规范实现的类,这个规范有很多,如
`Promise/A`
,
`Promise/B`
,
`Promise/D`
以及
`Promise/A`
的升级版
`Promise/A+`
,最终
`ES6`
中采用了
`Promise/A+`
规范。后来出现的
`Generator`
函数以及
`Async`
函数也是以
`Promise`
为基础的进一步封装,可见
`Promise`
在异步编程中的重要性。
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment