Thinktecture Webinar async/await in .NET
by
Sebastian Gingter
×
Copy
Open
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Slide 1
Slide 1 text
No content
Slide 2
Slide 2 text
2 Deep-dive in async/await bei Backend-APIs ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ Twitter:
Slide 3
Slide 3 text
3 ▪ ▪ ▪ (Theorie 😨) ▪ ▪ ▪ Deep-dive in async/await bei Backend-APIs
Slide 4
Slide 4 text
12 Deep-dive in async/await bei Backend-APIs • • • • • • •
Slide 5
Slide 5 text
13 Deep-dive in async/await bei Backend-APIs
Slide 6
Slide 6 text
14 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
Slide 7
Slide 7 text
15 • • • • • 🤯 Deep-dive in async/await bei Backend-APIs
Slide 8
Slide 8 text
16 Deep-dive in async/await bei Backend-APIs
Slide 9
Slide 9 text
17 ▪ ▪ ▪ ▪ ▪ ▪ ⏳ ▪ ▪ ▪ Deep-dive in async/await bei Backend-APIs ReadFile API: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-readfile
Slide 10
Slide 10 text
18 ▪ ▪ ▪ ▪ ▪ ▪ ⏳ ▪ Deep-dive in async/await bei Backend-APIs ReadFile API: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-readfile
Slide 11
Slide 11 text
19 Deep-dive in async/await bei Backend-APIs
Slide 12
Slide 12 text
20 • • async Task<> MyMethodAsync() • • • await OtherMethodAsync() • • await • • • • Deep-dive in async/await bei Backend-APIs
Slide 13
Slide 13 text
21 Deep-dive in async/await bei Backend-APIs
Slide 14
Slide 14 text
22 Deep-dive in async/await bei Backend-APIs
Slide 15
Slide 15 text
23 • • task.GetAwaiter().GetResult() → ❌ • Thread.Sleep() → ❌ • await Task.Delay() → ✔ • Thread.SpinWait() • → ❌ • → ✔ Deep-dive in async/await bei Backend-APIs
Slide 16
Slide 16 text
24 • • var task1 = DoSomethingAsync(); var task2 = DoSomethingElseAsync(); await Task.WhenAll(task1, task2); • • • Task.Factory.StartNew(…, TaskCreationOptions.LongRunning); • • • Deep-dive in async/await bei Backend-APIs
Slide 17
Slide 17 text
25 • • • • Deep-dive in async/await bei Backend-APIs
Slide 18
Slide 18 text
26 Deep-dive in async/await bei Backend-APIs
Slide 19
Slide 19 text
27 ▪ ▪ ▪ ▪ ▪ ▪ Deep-dive in async/await bei Backend-APIs
Slide 20
Slide 20 text
28 ▪ ▪ ▪ ▪ ▪ 😉 Deep-dive in async/await bei Backend-APIs
Slide 21
Slide 21 text
No content