Multithreading vs. Asynchronous

Multithreading & Asynchronous Programming are both Concurrent Programming.

Multithreading Asynchronous
CPU-concurrency I/O-concurrency
Thread class (old way) async.. await syntax
Task class (new way)

Task Parallel Library

Task Synchronous Programming Model

Task Parallel Library

Task Parallel Library is the preferred way of using Threads in C# for CPU concurrency.

image

var task = Task.Run((Action)DoProcess);
task.Wait();

Task Synchronous Programming Model

image

References

https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/