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
52
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
ワイがおすすめする新潟の食 / 20250530phpconf-niigata-eve
kasacchiful
0
300
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
110
Claude Codeの使い方
ttnyt8701
1
110
Development of an App for Intuitive AI Learning - Blockly Summit 2025
teba_eleven
0
110
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
940
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfold' relates to 'iterate'"
philipschwarz
PRO
0
190
Webからモバイルへ Vue.js × Capacitor 活用事例
naokihaba
0
620
Javaに鉄道指向プログラミング (Railway Oriented Pro gramming) のエッセンスを取り入れる/Bringing the Essence of Railway-Oriented Programming to Java
cocet33000
2
550
FormFlow - Build Stunning Multistep Forms
yceruto
1
170
コード書くの好きな人向けAIコーディング活用tips #orestudy
77web
3
300
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
1
680
WindowInsetsだってテストしたい
ryunen344
1
150
Featured
See All Featured
Practical Orchestrator
shlominoach
188
11k
Become a Pro
speakerdeck
PRO
28
5.4k
What's in a price? How to price your products and services
michaelherold
245
12k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
The Cost Of JavaScript in 2023
addyosmani
50
8.4k
Automating Front-end Workflow
addyosmani
1370
200k
Thoughts on Productivity
jonyablonski
69
4.7k
4 Signs Your Business is Dying
shpigford
184
22k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
The Language of Interfaces
destraynor
158
25k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
GraphQLとの向き合い方2022年版
quramy
46
14k
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ม