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
110
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
51
Coolroutines - non-blocking Kotlin
olbpetersson
0
67
JWTB - Begin EventSourcing With Lagom
olbpetersson
0
86
Begin EventSourcing with Lagom - Javaforum Q4 2017
olbpetersson
0
70
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
760
Reactive Java EE
olbpetersson
0
340
Other Decks in Education
See All in Education
世界の将来人口を誰でも語れるようになる
jo76shin
0
120
Information Architectures - Lecture 2 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
1.4k
Power Automate+ChatGPTを使ってエンジニア教育を改善してみた #RPALT
masakiokuda
0
140
Unraveling JavaScript Prototypes
debug_mode
0
140
Tips for the Presentation - Lecture 2 - Advanced Topics in Big Data (4023256FNR)
signer
PRO
0
200
1216
cbtlibrary
0
280
子どものためのプログラミング道場『CoderDojo』〜法人提携例〜 / Partnership with CoderDojo Japan
coderdojojapan
4
15k
Diseño de estrategia de analítica del aprendizaje en tu centro educativo.
tecuribarri
0
150
Image compression
hachama
0
400
LinkedIn
matleenalaakso
0
3.5k
書を持って、自転車で町へ出よう
yuritaco
0
140
ニュースメディアにおける生成 AI の活用と開発 / UTokyo Lecture Business Introduction
upura
0
230
Featured
See All Featured
Optimizing for Happiness
mojombo
376
70k
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
Side Projects
sachag
452
42k
Documentation Writing (for coders)
carmenintech
67
4.6k
Site-Speed That Sticks
csswizardry
4
380
Practical Orchestrator
shlominoach
186
10k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
21
2.5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
Visualization
eitanlees
146
15k
Designing for Performance
lara
604
68k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.4k
Six Lessons from altMBA
skipperchong
27
3.6k
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!