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
Co(ol)routines - Javaforum Q1
Search
Ola Petersson
February 21, 2019
Education
0
120
Co(ol)routines - Javaforum Q1
Slides for the javaforum gbg q1 presentation
Ola Petersson
February 21, 2019
Tweet
Share
More Decks by Ola Petersson
See All by Ola Petersson
NDC_Oslo__DevOps_in_Real_Life_-_A_How_To.pdf
olbpetersson
0
62
Coolroutines - non-blocking Kotlin
olbpetersson
0
76
JWTB - Begin EventSourcing With Lagom
olbpetersson
0
98
Begin EventSourcing with Lagom - Javaforum Q4 2017
olbpetersson
0
78
Begin Event Sourcing with Lagom
olbpetersson
2
180
JavaOne - Reactive Java EE
olbpetersson
0
150
JHipster - The best way to breed a new app
olbpetersson
0
810
Reactive Java EE
olbpetersson
0
340
Other Decks in Education
See All in Education
『会社を知ってもらう』から『安心して活躍してもらう』までの プロセスとフロー
sasakendayo
0
250
Webリテラシー基礎
takenawa
0
11k
大学院進学について(2025年度版)
imash
0
100
SARA Annual Report 2024-25
sara2023
1
200
Tutorial: Foundations of Blind Source Separation and Its Advances in Spatial Self-Supervised Learning
yoshipon
1
130
Common STIs in London: Symptoms, Risks & Prevention
medicaldental
0
140
20250625_なんでもCopilot 一年の振り返り
ponponmikankan
0
300
OJTに夢を見すぎていませんか? ロールプレイ研修の試行錯誤/tryanderror-in-roleplaying-training
takipone
1
190
万博非公式マップとFOSS4G
barsaka2
0
690
2025年度春学期 統計学 第8回 演習(1) 問題に対する答案の書き方(講義前配付用) (2025. 5. 29)
akiraasano
PRO
0
130
検索/ディスプレイ/SNS
takenawa
0
11k
万博マニアックマップを支えるオープンデータとその裏側
barsaka2
0
370
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Designing for humans not robots
tammielis
253
25k
Six Lessons from altMBA
skipperchong
28
3.9k
Site-Speed That Sticks
csswizardry
10
750
Testing 201, or: Great Expectations
jmmastey
45
7.6k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
750
BBQ
matthewcrist
89
9.8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.5k
Writing Fast Ruby
sferik
628
62k
GraphQLとの向き合い方2022年版
quramy
49
14k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
Scaling GitHub
holman
461
140k
Transcript
CO(OL)ROUTINES NON-BLOCKING KOTLIN
OLA PETERSSON @gotoola
[email protected]
None
JUNE, 2018 MISSION: TOP SECRET
TOTWOWITOTTOTEROR
T.W.I.T.T.E.R
“EVERY SECOND, ON AVERAGE, AROUND 6,000 T.W.E.E.T.S. ARE TWEETED ON
T.W.I.T.T.E.R.”
SO WE NEED TO BE FAST
None
None
None
COROUTINES
COROUTINES ARE LIGHTWEIGHT THREADS
THREAD
THREAD
COROUTINE
COROUTINE
@SinceKotlin("1.1") public interface Continuation<in T> { public val context: CoroutineContext
public fun resume(value: T) public fun resumeWithException(e: Throwable) }
public static Object getPizzaSlices(@NotNull Continuation c)
None
None
HOW DO WE WRITE ASYNC CODE?
DO YOU EVEN SPEAK FUTURE?
SHARED MUTABLE STATE
COROUTINESCOPE AND LIFECYCLES
NOW WHAT? STRUCTURED CONCURRENCY COROUTINE SCOPE DISPATCHERS (THREAD POOLS) KTOR
- A KOTLIN FRAMEWORK
HTTP://SLIDES.OLAPETERSSON.SE
HTTP://KOTLIN.OLAPETERSSON.SE
THANKS!