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
470
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
From Zero to Hero: How to put GPT LLMs & Friends into your Applications
phoenixhawk
0
45
DWX 2025 - Talk to your data
phoenixhawk
0
8
BASTA! Spring 2025 - Halluzinationen, Prompt Injections & Co.
phoenixhawk
0
79
SEACON 2024 - Talk to your Data
phoenixhawk
0
99
MLCon 2024 - Bootcamp: Conquer and Rule Generative AI
phoenixhawk
0
130
InfoDays Generative AI für Developer 2024
phoenixhawk
0
98
EKON 2024 - Prompt Injections, Halluzinationen und Co.
phoenixhawk
0
82
EKON 2024: Real World RAG mit eigenen Daten und Dokumenten
phoenixhawk
0
120
Gen AI Engineering Days - Prompt Injections, Hallucinations and More
phoenixhawk
0
130
Other Decks in Technology
See All in Technology
サービスを止めるな! DDoS攻撃へのスマートな備えと最前線の事例
coconala_engineer
1
180
How Do I Contact Jetblue Airlines® Reservation Number: Fast Support Guide
thejetblueairhelpsupport
0
150
shake-upを科学する
rsakata
7
1k
AI時代にも変わらぬ価値を発揮したい: インフラ・クラウドを切り口にユーザー価値と非機能要件に向き合ってエンジニアとしての地力を培う
netmarkjp
0
130
TLSから見るSREの未来
atpons
2
310
Digitization部 紹介資料
sansan33
PRO
1
4.5k
推し書籍📚 / Books and a QA Engineer
ak1210
0
140
SRE with AI:実践から学ぶ、運用課題解決と未来への展望
yoshiiryo1
0
300
CDK Toolkit Libraryにおけるテストの考え方
smt7174
1
550
〜『世界中の家族のこころのインフラ』を目指して”次の10年”へ〜 SREが導いたグローバルサービスの信頼性向上戦略とその舞台裏 / Towards the Next Decade: Enhancing Global Service Reliability
kohbis
3
1.5k
ABEMAの本番環境負荷試験への挑戦
mk2taiga
5
1.3k
Introduction to Bill One Development Engineer
sansan33
PRO
0
260
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Unsuck your backbone
ammeep
671
58k
The Language of Interfaces
destraynor
158
25k
Building Applications with DynamoDB
mza
95
6.5k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
340
How to Ace a Technical Interview
jacobian
278
23k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
A designer walks into a library…
pauljervisheath
207
24k
Agile that works and the tools we love
rasmusluckow
329
21k
Raft: Consensus for Rubyists
vanstee
140
7k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
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