Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
130
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
68
Coolroutines - non-blocking Kotlin
olbpetersson
0
86
JWTB - Begin EventSourcing With Lagom
olbpetersson
0
110
Begin EventSourcing with Lagom - Javaforum Q4 2017
olbpetersson
0
80
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
830
Reactive Java EE
olbpetersson
0
350
Other Decks in Education
See All in Education
the difficulty into words
ukky86
0
310
Node-REDで広がるプログラミング教育の可能性
ueponx
1
200
Entrepreneurship minor course at HSE 2025
karlov
0
140
いわゆる「ふつう」のキャリアを歩んだ人の割合(若者向け)
hysmrk
0
250
Introduction - Lecture 1 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
2.7k
Master of Applied Science & Engineering: Computer Science & Master of Science in Applied Informatics: Artificial Intelligence and Data Science
signer
PRO
0
860
【dip】「なりたい自分」に近づくための、「自分と向き合う」小さな振り返り
dip_tech
PRO
0
170
くまのココロンともぐらのロジ
frievea
0
110
コマンドラインを見直そう(1995年からタイムリープ)
sapi_kawahara
0
530
今の私を形作る4つの要素と偶然の出会い(セレンディピティ)
mamohacy
2
120
DIP_3_Frequency
hachama
0
310
20251119 如果是勇者欣美爾的話, 他會怎麼做? 東海資工
pichuang
0
130
Featured
See All Featured
A better future with KSS
kneath
240
18k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Six Lessons from altMBA
skipperchong
29
4.1k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Code Review Best Practice
trishagee
74
19k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
It's Worth the Effort
3n
187
29k
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!