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
0
140
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
71
Coolroutines - non-blocking Kotlin
olbpetersson
0
93
JWTB - Begin EventSourcing With Lagom
olbpetersson
0
110
Begin EventSourcing with Lagom - Javaforum Q4 2017
olbpetersson
0
82
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
840
Reactive Java EE
olbpetersson
0
360
Other Decks in Education
See All in Education
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
Blueprint for Strengthening Community Colleges Training Grant Success
territorium
PRO
0
130
Introduction - Lecture 1 - Information Visualisation (4019538FNR)
signer
PRO
0
5.3k
TinyGoをWebブラウザで動かすための方法+アルファ_20260201
masakiokuda
2
280
多様なメンター、多様な基準
yasulab
6
19k
Multimodal Interaction - Lecture 3 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
2k
Leveraging LLMs for student feedback in introductory data science courses (Stats Up AI)
minecr
1
240
ブランチ操作 / 02-a-branch
kaityo256
PRO
0
190
L'artisanat logiciel à l'heure du numérique responsable
thirion
0
120
Gluon Recruit Deck
gluon
0
160
小さなまちで始める デジタル創作の居場所〜すべての子どもが創造的に未来を描ける社会へ〜
codeforeveryone
0
150
HCI Research Methods - Lecture 7 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.4k
Featured
See All Featured
Context Engineering - Making Every Token Count
addyosmani
9
750
Code Reviewing Like a Champion
maltzj
528
40k
Odyssey Design
rkendrick25
PRO
2
540
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
230
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
120
Making the Leap to Tech Lead
cromwellryan
135
9.8k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
84
Embracing the Ebb and Flow
colly
88
5k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
The Curious Case for Waylosing
cassininazir
0
270
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
エンジニアに許された特別な時間の終わり
watany
106
240k
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!