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
Thinktecture Webinar async/await in .NET
Search
Sebastian Gingter
May 19, 2021
Technology
0
460
Thinktecture Webinar async/await in .NET
Slides for my webinar about async/await in .NET.
Sebastian Gingter
May 19, 2021
Tweet
Share
More Decks by Sebastian Gingter
See All by Sebastian Gingter
SEACON 2024 - Talk to your Data
phoenixhawk
0
39
MLCon 2024 - Bootcamp: Conquer and Rule Generative AI
phoenixhawk
0
57
InfoDays Generative AI für Developer 2024
phoenixhawk
0
39
EKON 2024 - Prompt Injections, Halluzinationen und Co.
phoenixhawk
0
16
EKON 2024: Real World RAG mit eigenen Daten und Dokumenten
phoenixhawk
0
56
Gen AI Engineering Days - Prompt Injections, Hallucinations and More
phoenixhawk
0
62
Gen AI Engineering Days - Talk to your Data
phoenixhawk
0
46
"Talk to your data": Improving RAG solutions based on real-world experiences
phoenixhawk
0
26
cim Lingen 2024 - Wieso versteht mich der Computer auf einmal? - Wir lüften das Geheimnis von Embeddings
phoenixhawk
0
47
Other Decks in Technology
See All in Technology
【JAWS-UG大阪 reInvent reCap LT大会 サンバが始まったら強制終了】“1分”で初めてのソロ参戦reInventを数字で振り返りながら反省する
ttelltte
0
140
Visual StudioとかIDE関連小ネタ話
kosmosebi
1
380
駆け出しリーダーとしての第一歩〜開発チームとの新しい関わり方〜 / Beginning Journey as Team Leader
kaonavi
0
120
DMMブックスへのTipKit導入
ttyi2
1
110
【Oracle Cloud ウェビナー】2025年のセキュリティ脅威を読み解く:リスクに備えるためのレジリエンスとデータ保護
oracle4engineer
PRO
1
100
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
1
16k
20250116_JAWS_Osaka
takuyay0ne
2
200
.NET 最新アップデート ~ AI とクラウド時代のアプリモダナイゼーション
chack411
0
200
【NGK2025S】動物園(PINTO_model_zoo)に遊びに行こう
kazuhitotakahashi
0
240
2024AWSで個人的にアツかったアップデート
nagisa53
1
110
実践! ソフトウェアエンジニアリングの価値の計測 ── Effort、Output、Outcome、Impact
nomuson
0
2.1k
dbtを中心にして組織のアジリティとガバナンスのトレードオンを考えてみた
gappy50
0
290
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
870
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Writing Fast Ruby
sferik
628
61k
Optimising Largest Contentful Paint
csswizardry
33
3k
The Cost Of JavaScript in 2023
addyosmani
46
7.2k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
240
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
570
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Transcript
None
2 Deep-dive in async/await bei Backend-APIs ▪ ▪ ▪ ▪
▪ ▪ ▪ ▪ ▪ Twitter:
3 ▪ 😨 ▪ ▪ ▪ ▪ ▪ Deep-dive in
async/await bei Backend-APIs
4 Deep-dive in async/await bei Backend-APIs
5 ▪ ▪ ▪ ▪ ▪ ▪ ▪ Deep-dive in
async/await bei Backend-APIs
6 Deep-dive in async/await bei Backend-APIs Kern 1 Kern 2
Kern 3 Kern 4 P2 T1 P2 T2 P3 T1 P1 T2 P3 T2 OS Scheduler P1 T1
7 • • • ▪ ▪ ▪ ▪ Deep-dive in
async/await bei Backend-APIs * Zahlen für Windows, Quelle: “Windows Internals“, Solomin, Russinovich et al. Jeffrey Richter sagt hingegen: 30 ms in Windows, Linux hat andere Zeiten…
8 • • • • • • • • •
• Deep-dive in async/await bei Backend-APIs
9 Deep-dive in async/await bei Backend-APIs Kern 1 Kern 2
Kern 3 Kern 4 P2 T1 P2 T2 P3 T1 P1 T1 P3 T2 P1 T2 Kontext-Wechsel Kontext- & Prozess-Wechsel
10 • • • • • • • • •
Deep-dive in async/await bei Backend-APIs ALU & FPU Registers 0 Registers 1 Classic CPU Core CPU Core with Hyper-Threading
11 Deep-dive in async/await bei Backend-APIs Kern 1 Kern 2
Kern 3 Kern 4 P2 T1 P2 T2 MyProc T1 P1 T2 P1 T1 MyProc T2 MyProc T3 MyProc T4 MyProc T5 MyProc T7 MyProc T6
12 Deep-dive in async/await bei Backend-APIs
13 Deep-dive in async/await bei Backend-APIs Task Task-Liste Threadpool T1
Threadpool T2 Kern 1 Kern 3 Kern 2 Kern 4 Threadpool T3 Threadpool T4 Threadpool Management Jeder Pool-Thread arbeitet Tasks in einer Endlosschleife ab Completed Tasks
14 • • • • • 🤯 Deep-dive in async/await
bei Backend-APIs
15 Deep-dive in async/await bei Backend-APIs
16 ▪ ▪ ▪ ▪ ▪ ▪ ⏳ ▪ ▪
▪ Deep-dive in async/await bei Backend-APIs ReadFile API: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-readfile
17 ▪ ▪ ▪ ▪ ▪ ▪ ⏳ ▪ Deep-dive
in async/await bei Backend-APIs ReadFile API: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-readfile
18 Deep-dive in async/await bei Backend-APIs
19 • • async Task<> MyMethodAsync() • • • await
OtherMethodAsync() • • await • • • • Deep-dive in async/await bei Backend-APIs
20 Deep-dive in async/await bei Backend-APIs
21 Deep-dive in async/await bei Backend-APIs
22 • • task.GetAwaiter().GetResult() → ❌ • Thread.Sleep() → ❌
• await Task.Delay() → ✔ • Thread.SpinWait() • → ❌ • → ✔ Deep-dive in async/await bei Backend-APIs
23 • • var task1 = DoSomethingAsync(); var task2 =
DoSomethingElseAsync(); await Task.WhenAll(task1, task2); • • • Task.Factory.StartNew(…, TaskCreationOptions.LongRunning); • • • Deep-dive in async/await bei Backend-APIs
24 • • • • Deep-dive in async/await bei Backend-APIs
25 Deep-dive in async/await bei Backend-APIs
26 ▪ ▪ ▪ ▪ ▪ ▪ Deep-dive in async/await
bei Backend-APIs
27 ▪ ▪ ▪ ▪ ▪ 😉 Deep-dive in async/await
bei Backend-APIs
None