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
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
80
Coolroutines - non-blocking Kotlin
olbpetersson
0
100
JWTB - Begin EventSourcing With Lagom
olbpetersson
0
120
Begin EventSourcing with Lagom - Javaforum Q4 2017
olbpetersson
0
88
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
Examen de Selectividad. Geografía junio 2026 (Convocatoria Ordinaria). UCLM
juanmartin2026
0
360
Examen de Selectividad. Geografía julio 2026 (Convocatoria Extraordinaria). UCLM
juanmartin2026
0
2.2k
プログラミング言語において文字列を複数行にわたって だらだらと記載するアレ
sapi_kawahara
0
160
Course Review - Lecture 13 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
2.3k
Estimating Group × Time Interaction in Scale-Transformed CEFR-J Self-Assessment Scores: A Case in Study-Abroad Research
uranoken
0
100
Implicit and Cross-Device Interaction - Lecture 10 - Next Generation User Interfaces (4018166FNR)
signer
PRO
2
2.3k
AIには考えられないことを考えられる人になるために
iqbocchi
1
170
0415
cbtlibrary
0
210
Portable & Reproducible Research Environments in the Age of AI Agents
denkiwakame
0
360
We部コミュニティスライド2026-04-24
junhat6
0
190
AI-Based Speaking Assessment of a Short-Term Study Abroad Program
uranoken
0
330
参加制約理論
roadofhope
0
120
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
First, design no harm
axbom
PRO
2
1.2k
Designing Powerful Visuals for Engaging Learning
tmiket
1
420
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.9k
ラッコキーワード サービス紹介資料
rakko
1
3.7M
Product Roadmaps are Hard
iamctodd
PRO
55
12k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
210
Optimising Largest Contentful Paint
csswizardry
37
3.7k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
410
Joys of Absence: A Defence of Solitary Play
codingconduct
1
400
We Have a Design System, Now What?
morganepeng
55
8.2k
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!