Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Understanding Coroutines
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
zhanpon
March 25, 2020
Programming
84
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Understanding Coroutines
zhanpon
March 25, 2020
Transcript
13 slides
ίϧʔνϯΛཧղ͍ͨ͠
͡Ίʹ — 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ม
More Decks by zhanpon
See All by zhanpon
Dr. Springlove
zhanpon
0
480
DDD and Spring Boot
zhanpon
0
2.1k
Other Decks in Programming
See All in Programming
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
210
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
390
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
270
特急いなほ as a Workflow / 20261107jaws-festa-2026-akita-lt
kasacchiful
PRO
0
100
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
410
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
800
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
350
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
340
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
130
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
670
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
6.1k
SODA - FACT BOOK(EN)
sodainc
1
280
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.7k
Optimizing for Happiness
mojombo
378
72k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
The Cult of Friendly URLs
andyhume
79
7.1k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
4
1.3k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
640
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
330
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k