Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Co(ol)routines - Javaforum Q1
Search
Ola Petersson
February 21, 2019
Education
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
90
Coolroutines - non-blocking Kotlin
olbpetersson
0
110
JWTB - Begin EventSourcing With Lagom
olbpetersson
0
120
Begin EventSourcing with Lagom - Javaforum Q4 2017
olbpetersson
0
92
Begin Event Sourcing with Lagom
olbpetersson
2
200
JavaOne - Reactive Java EE
olbpetersson
0
160
JHipster - The best way to breed a new app
olbpetersson
0
870
Reactive Java EE
olbpetersson
0
360
Other Decks in Education
See All in Education
CLASSIFICATION OF CRUDE DRUGS
pawan_pharm
0
220
Design Guidelines and Models - Lecture 5 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.7k
武藤の処世術を書いてみた
mutomasa
0
140
Introduction to Accounting
bvr7352
0
270
Introduction to M&A
bvr7352
0
240
Antigravityを使ってGeminiAPI(NanobananaPro)と連携して挿絵メーカーを作った
yoshimura_datam
0
260
Sekolah Sabat - Triwulan 3 2026 - Pelajaran 12
hiola
0
12k
1014
cbtlibrary
0
170
BRIEF OUTLINE OF IMPORTANT PLANT CONSTITUENTS
pawan_pharm
0
210
新入社員を「あの子」と呼ばない運動 -PBL その前に- / Stop Calling New Hires "Kids"
aokiplayer
2
930
CSS3 and Responsive Web Design - Lecture 5 - Web Technologies (1019888BNR)
signer
PRO
1
3.5k
El Geoparque Mundial UNESCO Volcanes de Calatrava de la Investigación Científica a la Transposición Didáctica en el aula
juanmartin2026
1
33k
Featured
See All Featured
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Abbi's Birthday
coloredviolet
4
10k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
540
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
My Coaching Mixtape
mlcsv
0
360
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.4k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Accessibility Awareness
sabderemane
1
250
Side Projects
sachag
456
43k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
270
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!