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
Transcript
29 slides
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!
More Decks by Ola Petersson
See All by Ola Petersson
NDC_Oslo__DevOps_in_Real_Life_-_A_How_To.pdf
olbpetersson
0
93
Coolroutines - non-blocking Kotlin
olbpetersson
0
110
JWTB - Begin EventSourcing With Lagom
olbpetersson
0
120
Begin EventSourcing with Lagom - Javaforum Q4 2017
olbpetersson
0
94
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
880
Reactive Java EE
olbpetersson
0
370
Other Decks in Education
See All in Education
Session 4 - Teknik Lobby dan Negosiasi
adeputra13
0
950
[2026後期火5] 論理学(京都大学文学部 後期 第4回)「∃ の規則と存在具体性」
yatabe
0
140
Design Guidelines and Models - Lecture 5 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.7k
Web 2.0 Patterns and Technologies - Lecture 8 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
JOINTS
pawan_pharm
0
170
Session 8 - Teknik Lobby dan Negosiasi
adeputra13
0
240
Sekolah Sabat - Triwulan 4 2026 - Pelajaran 2
hiola
0
11k
Unit 5: Valuation of Securities
bvr7352
0
270
Bilten 2025/26
radlovacki1976
0
160
DRUGS ACTING ON THE PERIPHERAL NERVOUS SYSTEM
pawan_pharm
0
240
HTML5 and the Open Web Platform - Lecture 3 - Web Technologies (1019888BNR)
signer
PRO
3
3.6k
クオリティエンジニアリング ーゲームの品質を支えるエンジニアー
segadevtech
2
1.6k
Featured
See All Featured
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
850
Between Models and Reality
mayunak
4
610
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
790
Thoughts on Productivity
jonyablonski
76
5.5k
Bash Introduction
62gerente
615
220k
How to make the Groovebox
asonas
2
2.6k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
310
Code Review Best Practice
trishagee
74
20k
Speed Design
sergeychernyshev
33
2.3k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
310
Darren the Foodie - Storyboard
khoart
PRO
5
4.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k