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
130
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
68
Coolroutines - non-blocking Kotlin
olbpetersson
0
82
JWTB - Begin EventSourcing With Lagom
olbpetersson
0
100
Begin EventSourcing with Lagom - Javaforum Q4 2017
olbpetersson
0
78
Begin Event Sourcing with Lagom
olbpetersson
2
190
JavaOne - Reactive Java EE
olbpetersson
0
150
JHipster - The best way to breed a new app
olbpetersson
0
820
Reactive Java EE
olbpetersson
0
350
Other Decks in Education
See All in Education
Online Privacy
takahitosakamoto
1
120
ARアプリを活用した防災まち歩きデータ作成ハンズオン
nro2daisuke
0
190
HCI and Interaction Design - Lecture 2 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.3k
Library Prefects 2025-2026
cbtlibrary
0
110
(2025) L'origami, mieux que la règle et le compas
mansuy
0
150
Avoin jakaminen ja Creative Commons -lisenssit
matleenalaakso
0
2k
Software
irocho
0
520
Présentation_2nde_2025.pdf
bernhardsvt
0
260
GOVERNOR ADDRESS:2025年9月29日合同公式訪問例会:2720 Japan O.K. ロータリーEクラブ、2025年10月6日卓話:藤田 千克由 氏(国際ロータリー第2720地区 2025-2026年度 ガバナー・大分中央ロータリークラブ・大分トキハタクシー(株)顧問)
2720japanoke
0
640
質のよいアウトプットをできるようになるために~「読む・聞く、まとめる、言葉にする」を読んで~
amarelo_n24
0
270
Adobe Express
matleenalaakso
1
8k
SISTEMA DE MEMORIA Y SU IMPACTO EN LAS DECISIONES.
jvpcubias
0
180
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
411
23k
Why Our Code Smells
bkeepers
PRO
340
57k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
880
Context Engineering - Making Every Token Count
addyosmani
7
270
Faster Mobile Websites
deanohume
310
31k
Code Review Best Practice
trishagee
72
19k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Practical Orchestrator
shlominoach
190
11k
A better future with KSS
kneath
239
18k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
Unsuck your backbone
ammeep
671
58k
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!