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
70
DWX 2025 - Talk to your data
phoenixhawk
0
15
BASTA! Spring 2025 - Halluzinationen, Prompt Injections & Co.
phoenixhawk
0
95
SEACON 2024 - Talk to your Data
phoenixhawk
0
130
MLCon 2024 - Bootcamp: Conquer and Rule Generative AI
phoenixhawk
0
150
InfoDays Generative AI für Developer 2024
phoenixhawk
0
120
EKON 2024 - Prompt Injections, Halluzinationen und Co.
phoenixhawk
0
100
EKON 2024: Real World RAG mit eigenen Daten und Dokumenten
phoenixhawk
0
130
Gen AI Engineering Days - Prompt Injections, Hallucinations and More
phoenixhawk
0
160
Other Decks in Technology
See All in Technology
AIエージェントで90秒の広告動画を制作!台本・音声・映像・編集をつなぐAWS最新アーキテクチャの実践
nasuvitz
3
290
Webアプリケーションにオブザーバビリティを実装するRust入門ガイド
nwiizo
7
860
初めてAWSを使うときのセキュリティ覚書〜初心者支部編〜
cmusudakeisuke
1
270
slog.Handlerのよくある実装ミス
sakiengineer
4
400
5年目から始める Vue3 サイト改善 #frontendo
tacck
PRO
3
230
20250912_RPALT_データを集める→とっ散らかる問題_Obsidian紹介
ratsbane666
0
100
Codeful Serverless / 一人運用でもやり抜く力
_kensh
7
450
Terraformで構築する セルフサービス型データプラットフォーム / terraform-self-service-data-platform
pei0804
1
190
「Linux」という言葉が指すもの
sat
PRO
4
140
Modern Linux
oracle4engineer
PRO
0
150
株式会社ログラス - 会社説明資料【エンジニア】/ Loglass Engineer
loglass2019
4
65k
実践!カスタムインストラクション&スラッシュコマンド
puku0x
0
480
Featured
See All Featured
Designing Experiences People Love
moore
142
24k
For a Future-Friendly Web
brad_frost
180
9.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
Speed Design
sergeychernyshev
32
1.1k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
Music & Morning Musume
bryan
46
6.8k
KATA
mclloyd
32
14k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
113
20k
Bash Introduction
62gerente
615
210k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Rails Girls Zürich Keynote
gr2m
95
14k
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