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
100
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
49
Coolroutines - non-blocking Kotlin
olbpetersson
0
67
JWTB - Begin EventSourcing With Lagom
olbpetersson
0
84
Begin EventSourcing with Lagom - Javaforum Q4 2017
olbpetersson
0
69
Begin Event Sourcing with Lagom
olbpetersson
2
170
JavaOne - Reactive Java EE
olbpetersson
0
140
JHipster - The best way to breed a new app
olbpetersson
0
740
Reactive Java EE
olbpetersson
0
340
Other Decks in Education
See All in Education
2024年度秋学期 統計学 第12回 分布の平均を推測する - 区間推定 (2024. 12. 11)
akiraasano
PRO
0
100
JavaScript - Lecture 6 - Web Technologies (1019888BNR)
signer
PRO
0
2.6k
COO's Perspective : Code for Everyone 2020-2024
codeforeveryone
0
240
AI 時代軟體工程師的持續升級
mosky
0
1.4k
Adobe Express
matleenalaakso
1
7.6k
Algo de fontes de alimentación
irocho
1
470
TP5_-_UV.pdf
bernhardsvt
0
130
H5P-työkalut
matleenalaakso
4
36k
Stratégie de marketing digital - les fondamentaux
martine
0
170
Ch2_-_Partie_1.pdf
bernhardsvt
0
130
Unraveling JavaScript Prototypes
debug_mode
0
130
BrightonSEO, San Diego, CA 2024
mchowning
0
120
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
328
21k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
A Philosophy of Restraint
colly
203
16k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
GitHub's CSS Performance
jonrohan
1030
460k
Bash Introduction
62gerente
610
210k
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.2k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Navigating Team Friction
lara
183
15k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
570
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!