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
✅ レポート採点基準 / How Your Reports Are Assessed
yasslab
PRO
0
360
勾配ブースティングと決定木の話 / gradient boosting and decision trees
kaityo256
PRO
6
1.2k
Course Review - Lecture 13 - Information Visualisation (4019538FNR)
signer
PRO
1
2.6k
Populism, Post-Liberalism & Climate Change
vyadav
0
170
[2026前期火5] 論理学(京都大学文学部 前期 第6回)「かつとまたはの規則」
yatabe
0
210
プログラミング言語において文字列を複数行にわたって だらだらと記載するアレ
sapi_kawahara
0
150
Data Management and Analytics Specialisation
signer
PRO
0
1.8k
AI進化史:LLMからAIエージェントへ
mickey_kubo
0
180
事業紹介資料(トレーナー養成講座)
kentaro1981
0
420
0506
cbtlibrary
0
180
Why the humanities may be your best career bet
figarospeech
0
190
Gesture-based Interaction - Lecture 6 - Next Generation User Interfaces (4018166FNR)
signer
PRO
1
2.3k
Featured
See All Featured
Designing Experiences People Love
moore
143
24k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.6k
Facilitating Awesome Meetings
lara
57
6.9k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
200
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
How STYLIGHT went responsive
nonsquared
100
6.2k
Color Theory Basics | Prateek | Gurzu
gurzu
0
320
HDC tutorial
michielstock
2
680
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
460
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!