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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
zhanpon
March 25, 2020
Programming
0
58
Understanding Coroutines
zhanpon
March 25, 2020
Tweet
Share
More Decks by zhanpon
See All by zhanpon
Dr. Springlove
zhanpon
0
460
DDD and Spring Boot
zhanpon
0
2k
Other Decks in Programming
See All in Programming
組織で育むオブザーバビリティ
ryota_hnk
0
170
CSC307 Lecture 02
javiergs
PRO
1
780
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.3k
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
120
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
720
AgentCoreとHuman in the Loop
har1101
5
230
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
460
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
250
Featured
See All Featured
Everyday Curiosity
cassininazir
0
130
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
580
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
430
Fireside Chat
paigeccino
41
3.8k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
120
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
220
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ม