Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
async/await
Search
Eduardo Quagliato
February 21, 2017
Programming
77
0
Share
async/await
A presentation about async/await focused on Node.js.
Eduardo Quagliato
February 21, 2017
More Decks by Eduardo Quagliato
See All by Eduardo Quagliato
nodejsCWB[1]
quagliato
0
36
nodejsCWB[0]
quagliato
0
25
CfCWB Workshop - MEAN
quagliato
0
92
Explosão Controlada
quagliato
1
310
Other Decks in Programming
See All in Programming
我々はなぜ「層」を分けるのか〜「関心の分離」と「抽象化」で手に入れる変更に強いシンプルな設計〜 #phperkaigi / PHPerKaigi 2026
shogogg
2
740
おれのAgentic Coding 2026/03
tsukasagr
1
120
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
350
Feature Toggle は捨てやすく使おう
gennei
0
400
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.5k
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
290
AI活用のコスパを最大化する方法
ochtum
0
360
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
160
ロボットのための工場に灯りは要らない
watany
12
3.3k
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.5k
ファインチューニングせずメインコンペを解く方法
pokutuna
0
250
「速くなった気がする」をデータで疑う
senleaf24
0
120
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
160
Amusing Abliteration
ianozsvald
1
150
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
260
Scaling GitHub
holman
464
140k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Raft: Consensus for Rubyists
vanstee
141
7.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Building Adaptive Systems
keathley
44
3k
Evolving SEO for Evolving Search Engines
ryanjones
0
170
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.6k
Transcript
async/await
WTF?
async/await são funções especificadas a partir do ES8/ECMAScript2017 para processamento
assíncrono.
O que é ES8/EMCAScript2017???
ECMA International = European Computer Manufactorers Association
ECMAScript é uma linguagem de script especificada pela ECMA baseada
na especificação ECMA-262 http://www.ecma-international.org/ecma-262/6.0/
ECMAScript foi baseada em JavaScript mas hoje JavaScript acompanha a
especificação da ECMA
Então, ES8/ECMAScript2017 é a 8ª especificação da ECMAScript, a ser
lançada em 2017
ES8/ECMAScript2017 ainda em implementação por navegadores motores, ambientes de execução
Voltando pro async/await...
2 novas palavras reservadas:
async
await
Mas antes...
Promise
Exemplo roubado de https://braziljs.org/blog/promises-no-javascript/
async • Como o próprio nome já diz, é uma
função assíncrona • Deve obrigatoriamente retornar uma Promise
await • “wait” = “esperar” • await só pode esperar
função assíncrona (async)
E ajudam a evitar isso...
… e isso.
Quer mais? • http://bit.ly/AsyncAwaitLink1 • http://bit.ly/AsyncAwaitLink2 • http://bit.ly/AsyncAwaitLink3 • http://bit.ly/AsyncAwaitLink4
Muito obrigado! dúvidas?
[email protected]