Summary
The .NET Framework supports multithreaded programming in two ways:
By letting you explicitly create and use threads.
By letting you make asynchronous calls.
Using the class Thread, you can create a thread, abort a thread, or wait for a thread to complete. You can also adjust the properties of a thread, such as the priority and the COM apartment model.
Class Thread and all other thread-related classes are defined under the namespace System.Threading.
You can use asynchronous delegates to make asynchronous calls. In this case, .NET uses threads from a thread pool to serve your request. You can use BeginInvoke to execute a method asynchronously and optionally use EndInvoke to retrieve output parameters. The asynchronous delegates work seamlessly ...
Get .NET Programming: A Practical Guide Using C# now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.