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
中小規模私大の教学IRを支えるデータマネジメント ― データ基盤構築の取り組みと実務の現在地 ―
terazawa
0
230
Sekolah Sabat - Triwulan 4 2026 - Pelajaran 3
hiola
0
6.7k
セキュリティ担当がいない中小医療機関を院外のRISSはどう支えるべきか / How External RISS Can Help Small Medical Institutions
eller86
1
230
aini school小中等部説明会資料
ainischool
0
180
学生のうちに考えておきたい信頼の話
suisan
1
840
CLASSIFICATION OF CRUDE DRUGS
pawan_pharm
0
220
Railsチュートリアル × 反転学習の事例紹介
yasslab
PRO
3
190k
学習者データを「見る」:外国語教師のためのデータの入力、分析、解釈方法
uranoken
0
440
Invest Early, Build Together
rashwhitman
0
750
Design Guidelines and Models - Lecture 5 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.7k
SANG PENCIPTA BERBICARA (01ABSG-Q4-2026)
ssmedikasda
0
470
BRIEF OUTLINE OF IMPORTANT PLANT CONSTITUENTS
pawan_pharm
0
210
Featured
See All Featured
Google's AI Overviews - The New Search
badams
0
1.6k
A Modern Web Designer's Workflow
chriscoyier
699
190k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Agile that works and the tools we love
rasmusluckow
331
22k
Speed Design
sergeychernyshev
33
2.2k
First, design no harm
axbom
PRO
2
1.3k
Done Done
chrislema
187
17k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Visualization
eitanlees
153
17k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
RailsConf 2023
tenderlove
30
1.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!