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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ola Petersson
February 21, 2019
Education
150
0
Share
Co(ol)routines - Javaforum Q1
Slides for the javaforum gbg q1 presentation
Ola Petersson
February 21, 2019
More Decks by Ola Petersson
See All by Ola Petersson
NDC_Oslo__DevOps_in_Real_Life_-_A_How_To.pdf
olbpetersson
0
77
Coolroutines - non-blocking Kotlin
olbpetersson
0
99
JWTB - Begin EventSourcing With Lagom
olbpetersson
0
110
Begin EventSourcing with Lagom - Javaforum Q4 2017
olbpetersson
0
83
Begin Event Sourcing with Lagom
olbpetersson
2
200
JavaOne - Reactive Java EE
olbpetersson
0
150
JHipster - The best way to breed a new app
olbpetersson
0
850
Reactive Java EE
olbpetersson
0
360
Other Decks in Education
See All in Education
2026年度春学期 統計学 講義の進め方と成績評価について (2026. 4. 9)
akiraasano
PRO
0
180
Info Session MSc Computer Science & MSc Applied Informatics
signer
PRO
0
280
モブ社員がモブエンジニアを名乗って得られたこと_20260413
masakiokuda
4
510
fake vs real
latrrr
0
140
0415
cbtlibrary
0
200
Tangible, Embedded and Embodied Interaction - Lecture 7 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
2.3k
Gitがない時代 インターネットがない時代の 開発話
sapi_kawahara
0
260
2026年度春学期 統計学 第6回 データの関係を知る(1)ー 相関関係 (2026. 5. 14)
akiraasano
PRO
0
110
Human-AI Interaction - Lecture 11 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
1k
We部コミュニティスライド2026-04-24
junhat6
0
170
2026年度春学期 統計学 第4回 データを「分布」で見る (2026. 4. 30)
akiraasano
PRO
0
130
良い塩梅を実現する、AWSネットワーク3分クッキング
masakiokuda
1
260
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
1
390
The Mindset for Success: Future Career Progression
greggifford
PRO
0
350
Design in an AI World
tapps
1
220
It's Worth the Effort
3n
188
29k
Producing Creativity
orderedlist
PRO
348
40k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
380
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
720
Exploring anti-patterns in Rails
aemeredith
3
380
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
570
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
130
The Cost Of JavaScript in 2023
addyosmani
55
10k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
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!