Share Link
Copied to clipboard
Embed on Your Page
Copied to clipboard
We Stand with Ukraine
.NET Fiddle Newsletter #2: Sync vs async vs parallel by Anonymous

============================

MakeBreakfastAsync

NOTE: tasks maybe using different threads provided by ThreadPool, but unlike parallel programming, it is only one thread at a time

1 00:00.000   MakeBreakfastAsync Start
1 00:00.006   BoilCoffeeAsync Start
1 00:00.010   ToastBreadAsync Start
1 00:00.010   FryEggsAsync Start
5 00:00.109   BoilCoffeeAsync End
7 00:00.110   ToastBreadAsync End
7 00:00.111   FryEggsAsync End
7 00:00.111   MakeBreakfastAsync End

Total time: 112.1322ms
Cached Result
Last Run: 5:45:35 am
Compile: 0.014s
Execute: 0.18s
Memory: 4.14Mb
CPU: 0.194s