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
450
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
Generative AI: Semantische Suche und LLMs jenseits des Hello World-RAG-Tutorials
phoenixhawk
0
22
Webinar: Moderne Semantische Suche mit LLMs, Vektor-Datenbanken und LangChain
phoenixhawk
0
180
BASTA 2023 Blazor Statemanagement
phoenixhawk
0
33
.NET 7 Web-APIs mit Turbo: Deep-Dive in async/await
phoenixhawk
0
230
Turbopower - Ein Blick unter die Haube der .NET 7 Performance-Optimierungen
phoenixhawk
0
94
BASTA! Spring 2023 - .NET 7 Performanceoptimierungen unter der Lupe
phoenixhawk
0
74
Webinar: Blazor Webassembly - State Management in der Praxis
phoenixhawk
0
620
BASTA! Spring 2022 - Web-APIs mit Async & Await
phoenixhawk
0
1k
Thinktecture Webinar: Web-API mit Turbo:Deep-dive in async/awaitfür Backend-APIs
phoenixhawk
0
830
Other Decks in Technology
See All in Technology
SIEMを用いて、セキュリティログ分析の可視化と分析を実現し、PDCAサイクルを回してみた
coconala_engineer
0
270
Java EE/Jakarta EEの現状と将来―クラウドネイティブ時代にJava EEは対応できるのか?―
takakiyo
1
130
ServiceNow Knowledge 24の歩き方 EYストラテジー・アンド・コンサルティング
manarobot
0
170
WebアプリケーションにおけるPDOの使い方入門 / phpcon odawara 2024
meihei3
2
440
よく聞くけど使ったことないソフトウェアNo.1 KafkaとSnowflake
foursue
4
320
Tableau事例紹介 / Tableau Case Study of Eureka
kazuya_araki_tokyo
1
180
Terraformあれやこれ/terraform-this-and-that
emiki
8
1.3k
GraphQL 成熟度モデルの紹介と、プロダクトに当てはめた事例 / GraphQL maturity model
mh4gf
7
1.3k
KubeCon EU 2024 Recap “Kubernetes Policy Time Machine: Where to Next?”
ryysud
0
190
SREとその組織類型
tatsuo48
9
1.6k
MLOpsの「壁」を乗り越える、LINEヤフーの Data Quality as Code
lycorptech_jp
PRO
4
210
複雑な構成要素を持つUIとの向き合い方 〜新・支出グラフでの実例〜 / B43 TECH TALK
nakamuuu
0
130
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
132
6.3k
A Philosophy of Restraint
colly
196
16k
Practical Orchestrator
shlominoach
181
9.7k
Six Lessons from altMBA
skipperchong
20
3k
RailsConf 2023
tenderlove
2
530
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
The Mythical Team-Month
searls
215
42k
Adopting Sorbet at Scale
ufuk
67
8.6k
The Cult of Friendly URLs
andyhume
74
5.7k
Build The Right Thing And Hit Your Dates
maggiecrowley
23
2k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
What's in a price? How to price your products and services
michaelherold
237
11k
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