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
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
70
Coolroutines - non-blocking Kotlin
olbpetersson
0
90
JWTB - Begin EventSourcing With Lagom
olbpetersson
0
110
Begin EventSourcing with Lagom - Javaforum Q4 2017
olbpetersson
0
81
Begin Event Sourcing with Lagom
olbpetersson
2
190
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
10分で学ぶ すてきなモナド
soukouki
1
140
Going over the Edge
jonoalderson
0
320
子どものためのプログラミング道場『CoderDojo』〜法人提携例〜 / Partnership with CoderDojo Japan
coderdojojapan
PRO
4
18k
20251119 如果是勇者欣美爾的話, 他會怎麼做? 東海資工
pichuang
0
170
Semantic Web and Web 3.0 - Lecture 9 - Web Technologies (1019888BNR)
signer
PRO
2
3.2k
1216
cbtlibrary
0
140
1014
cbtlibrary
0
520
Introdución ás redes
irocho
0
530
TeXで変える教育現場
doratex
1
11k
1008
cbtlibrary
0
130
✅ レポート採点基準 / How Your Reports Are Assessed
yasslab
PRO
0
270
Design Guidelines and Models - Lecture 5 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.3k
Featured
See All Featured
My Coaching Mixtape
mlcsv
0
44
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
310
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
Faster Mobile Websites
deanohume
310
31k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Google's AI Overviews - The New Search
badams
0
900
sira's awesome portfolio website redesign presentation
elsirapls
0
140
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
150
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
88
Side Projects
sachag
455
43k
Accessibility Awareness
sabderemane
0
45
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!