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
0
73
async/await
A presentation about async/await focused on Node.js.
Eduardo Quagliato
February 21, 2017
Tweet
Share
More Decks by Eduardo Quagliato
See All by Eduardo Quagliato
nodejsCWB[1]
quagliato
0
33
nodejsCWB[0]
quagliato
0
22
CfCWB Workshop - MEAN
quagliato
0
88
Explosão Controlada
quagliato
1
310
Other Decks in Programming
See All in Programming
JSONataを使ってみよう Step Functionsが楽しくなる実践テクニック #devio2025
dafujii
1
530
アセットのコンパイルについて
ojun9
0
120
Laravel Boost 超入門
fire_arlo
3
210
Swift Updates - Learn Languages 2025
koher
2
470
時間軸から考えるTerraformを使う理由と留意点
fufuhu
16
4.8k
今だからこそ入門する Server-Sent Events (SSE)
nearme_tech
PRO
3
190
Processing Gem ベースの、2D レトロゲームエンジンの開発
tokujiros
2
130
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
430
「手軽で便利」に潜む罠。 Popover API を WCAG 2.2の視点で安全に使うには
taitotnk
0
850
How Android Uses Data Structures Behind The Scenes
l2hyunwoo
0
440
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
22
5.7k
Navigating Dependency Injection with Metro
zacsweers
3
260
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Documentation Writing (for coders)
carmenintech
74
5k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
810
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
RailsConf 2023
tenderlove
30
1.2k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
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]