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
75
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
Virtual and Augmented Reality - Lecture 8 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
2.2k
Human-AI Interaction - Lecture 11 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
980
Liberalism's Last Man and Asia
vyadav
0
120
BITCOIN : Les fondamentaux !
rlifchitz
0
130
教育現場から見た Ruby on Rails
yasslab
PRO
0
140
Interactive Tabletops and Surfaces - Lecture 5 - Next Generation User Interfaces (4018166FNR)
signer
PRO
1
2.2k
Science Tokyo国際卓越研究大学計画_202604
sciencetokyo
PRO
0
2.4k
LinkedIn
matleenalaakso
0
4.1k
Measuring what matters
jonoalderson
0
290
バージョン管理とは / 01-a-vcs
kaityo256
PRO
1
320
Lenguajes de Programacion (Ingresantes UNI 2026)
robintux
0
170
Dashboards - Lecture 11 - Information Visualisation (4019538FNR)
signer
PRO
1
2.6k
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Paper Plane
katiecoart
PRO
1
50k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
200
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Being A Developer After 40
akosma
91
590k
Side Projects
sachag
455
43k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
790
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Visualization
eitanlees
150
17k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
340
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
740
The agentic SEO stack - context over prompts
schlessera
0
770
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!