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
79
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
44
Coolroutines - non-blocking Kotlin
olbpetersson
0
63
JWTB - Begin EventSourcing With Lagom
olbpetersson
0
78
Begin EventSourcing with Lagom - Javaforum Q4 2017
olbpetersson
0
63
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
630
Reactive Java EE
olbpetersson
0
330
Other Decks in Education
See All in Education
Monaca Educationを活用した課題解決型の探究学習の実践
asial_edu
0
200
財務分析 - 入門編
lsuzuki
0
370
Padlet opetuksessa
matleenalaakso
3
11k
Gesture-based Interaction - Lecture 8 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
1.2k
生成AIを活用できる大学教職員になる-基本と実践-
gmoriki
0
290
Virtual and Augmented Reality - Lecture 8 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
1.2k
UniKL 2024 - Phishing Security Awareness: Malware
x86fatah
0
110
全員参加型で会社を強くしていく活動を考えてみる
ikefukurou777
0
200
情報Iの「縦糸」と「横糸」を意識したプログラム教育の実践
asial_edu
0
200
前期教育実習事前指導0221
naradai
0
130
Monaca Educationを活用したプログラミング授業実践
asial_edu
0
200
Introduction - Lecture 1 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
3k
Featured
See All Featured
KATA
mclloyd
14
12k
Practical Orchestrator
shlominoach
181
9.7k
Imperfection Machines: The Place of Print at Facebook
scottboms
259
12k
Why Our Code Smells
bkeepers
PRO
331
56k
Building an army of robots
kneath
300
41k
Testing 201, or: Great Expectations
jmmastey
27
6.3k
A Tale of Four Properties
chriscoyier
150
22k
Teambox: Starting and Learning
jrom
128
8.4k
Writing Fast Ruby
sferik
620
60k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
243
20k
Building Better People: How to give real-time feedback that sticks.
wjessup
354
18k
Reflections from 52 weeks, 52 projects
jeffersonlam
344
19k
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!