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
98
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
49
Coolroutines - non-blocking Kotlin
olbpetersson
0
67
JWTB - Begin EventSourcing With Lagom
olbpetersson
0
84
Begin EventSourcing with Lagom - Javaforum Q4 2017
olbpetersson
0
67
Begin Event Sourcing with Lagom
olbpetersson
2
170
JavaOne - Reactive Java EE
olbpetersson
0
140
JHipster - The best way to breed a new app
olbpetersson
0
720
Reactive Java EE
olbpetersson
0
330
Other Decks in Education
See All in Education
Canva
matleenalaakso
0
430
ルクソールとツタンカーメン
masakamayama
1
860
Adobe Express
matleenalaakso
1
7.5k
謙虚なアジャイルコーチ__アダプティブ_ムーブ_による伴走支援.pdf
antmiyabin
0
270
2409_CompanyInfo_Hanji_published.pdf
yosukemurata
0
380
セキュリティ・キャンプ全国大会2024 S17 探査機自作ゼミ 事前学習・当日資料
sksat
3
850
【COPILOT無料セミナー】エンゲージメントと自律性の高いプロジェクト型人材育成に向けて~プロジェクト・ベースド・ラーニング(PBL)という選択肢~
copilot
PRO
0
130
Web Application Frameworks - Lecture 4 - Web Technologies (1019888BNR)
signer
PRO
0
2.6k
Ch2_-_Partie_2.pdf
bernhardsvt
0
110
お仕事図鑑pitchトーク
tetsuyaooooo
0
2.3k
HCI Research Methods - Lecture 7 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
710
Epithelium Flashcards
ndevaul
0
1k
Featured
See All Featured
A designer walks into a library…
pauljervisheath
204
24k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
KATA
mclloyd
29
14k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
A Tale of Four Properties
chriscoyier
156
23k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Code Reviewing Like a Champion
maltzj
520
39k
Typedesign – Prime Four
hannesfritz
40
2.4k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Side Projects
sachag
452
42k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
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!