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
47
Understanding Coroutines
zhanpon
March 25, 2020
Tweet
Share
More Decks by zhanpon
See All by zhanpon
Dr. Springlove
zhanpon
0
420
DDD and Spring Boot
zhanpon
0
1.9k
Other Decks in Programming
See All in Programming
Kamal 2 – Get Out of the Cloud
aleksandrov
1
180
Ruby's Line Breaks
yui_knk
2
770
The Evolution of the CRuby Build System
kateinoigakukun
0
130
[NG India] Event-Based State Management with NgRx SignalStore
markostanimirovic
1
140
ミリしらMCP勉強会
watany
4
740
Chrome Extension Techniques from Hell
moznion
1
160
マルチアカウント環境での、そこまでがんばらない RI/SP 運用設計
wa6sn
0
720
Agentic Applications with Symfony
el_stoffel
2
280
AI Agents with JavaScript
slobodan
0
220
PHP で学ぶ OAuth 入門
azuki
1
180
List とは何か? / PHPerKaigi 2025
meihei3
0
810
サービスクラスのありがたみを発見したときの思い出 #phpcon_odawara
77web
4
630
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
522
40k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.6k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.4k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.3k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
2.9k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
A Tale of Four Properties
chriscoyier
158
23k
Faster Mobile Websites
deanohume
306
31k
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ม