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
Understanding Coroutines
Search
zhanpon
March 25, 2020
Programming
0
53
Understanding Coroutines
zhanpon
March 25, 2020
Tweet
Share
More Decks by zhanpon
See All by zhanpon
Dr. Springlove
zhanpon
0
440
DDD and Spring Boot
zhanpon
0
2k
Other Decks in Programming
See All in Programming
Porting a visionOS App to Android XR
akkeylab
0
680
「App Intent」よくわからんけどすごい!
rinngo0302
1
100
#QiitaBash MCPのセキュリティ
ryosukedtomita
1
1.5k
ニーリーにおけるプロダクトエンジニア
nealle
0
950
顧客の画像データをテラバイト単位で配信する 画像サーバを WebP にした際に起こった課題と その対応策 ~継続的な取り組みを添えて~
takutakahashi
4
1.3k
テストから始めるAgentic Coding 〜Claude Codeと共に行うTDD〜 / Agentic Coding starts with testing
rkaga
15
5.6k
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
0
260
ソフトウェア設計とAI技術の活用
masuda220
PRO
17
3.5k
オンコール⼊⾨〜ページャーが鳴る前に、あなたが備えられること〜 / Before The Pager Rings
yktakaha4
2
990
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
170
AI コーディングエージェントの時代へ:JetBrains が描く開発の未来
masaruhr
1
200
Deep Dive into ~/.claude/projects
hiragram
14
14k
Featured
See All Featured
Become a Pro
speakerdeck
PRO
29
5.4k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
GraphQLとの向き合い方2022年版
quramy
49
14k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.3k
The Cult of Friendly URLs
andyhume
79
6.5k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
For a Future-Friendly Web
brad_frost
179
9.8k
Visualization
eitanlees
146
16k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
Transcript
ίϧʔνϯΛཧղ͍ͨ͠
͡Ίʹ — Goal: ίϧʔνϯΛཧղ͢ΔͨΊͷಓےΛࣔ͢ — Non-Goal: Kotlinͷίϧʔνϯͷৄ͍͠
XΛཧղ͢Δͱʁ
ઃܭॻΛಡΜͰΈΔ — KEEP: Kotlin Evolution and Enhancement Process — Kotlinͷ৽͍͠ݴޠػೳͷϓϩϙʔβϧ͕ࡌ͍ͬͯΔ
— ίϧʔνϯͷઃܭʹ͍ͭͯίϯύΫτʹ·ͱ·͍ͬͯΔ
KEEPͷ༰ — Ϣʔεέʔε: ඇಉظॲཧɺFutureɺδΣωϨʔλʔɺඇಉ ظUIͳͲ͕ίϧʔνϯʹΑͬͯͲ͏ॻ͚Δ͔ — ίϧʔνϯͷ֓ཁ: ༻ޠूɺͦͯ͠جຊతͳ֓೦ͷղઆ — ࣮ͷৄࡉ:
CPSมɺState machineͳͲ
XΛཧղ͢Δͱ — XΛͬͨϓϩάϥϜΛॻ͚Δ — XͷηϚϯςΟΫε͕͔Δ — Xͷ࣮Λ͍ͬͯΔ
ͳͥKotlinͷίϧʔνϯ͍͠ͷ͔ — ৽͍֓͠೦͔ͩΒ: Javaͷݴޠػೳʹίϧʔνϯͳ͍ ʢProject LoomʹΑͬͯࠓޙ࣮͞ΕΔ͔ʣ — ͍Ζ͍Ζͳॻ͖ํ͕༻ҙ͞Ε͍ͯΔ: suspend fun,
launch{}, future{}, .await(), sequence{}, yield, ... — ϚϧνεϨουͱͷؔ
ίϧʔνϯΛཧղ͢ΔͨΊͷγϯϓϧͳΈ — Revisiting CoroutinesΑΓ — ϓϦϛςΟϒ3͚ͭͩ: create, resume, yield —
ಈ࡞͢ΔαϯϓϧίʔυͷͨΊʹLuaΛ͏ — ҎԼͷεϥΠυͰར༻͢Δαϯϓϧίʔυ: https:// gist.github.com/zhanpon/ 5db10a44649b60f234732453907ffb6f
ίϧʔνϯݺͼग़ͤΔ — createͰ࡞ — resumeͰݺͼग़͠
ίϧʔνϯதஅͰ͖Δ — yieldͰதஅ
Ԡ༻: ϚϧνλεΫ — தஅͱ࠶։͕Ͱ͖Δίϧʔνϯͷੑ࣭ΛԠ༻͢Δ — ෳͷίϧʔνϯΛॱ൪ʹதஅɾ࠶։ͤ͞Εಉ࣌ʹಈ͍ ͍ͯΔΑ͏ʹݟ͑Δʂ
ࢀߟจݙ — KEEP: Kotlin Coroutines — Revisiting Coroutines — Programming
in Lua, Chapter 9
ѻΘͳ͔ͬͨτϐοΫ — ܧଓͷ֓೦ — ίϧʔνϯΛͬͯྫ֎Λ࣮͢Δ — CPSม