Development language: c#3.0
Ide:visual Studio 2008
This series of tutorials mainly includes the following:
1. BeginInvoke and EndInvoke methods
2. Thread class
3. Thread pool
4. Thread Synchronization Basics
5. Deadlock
6.7 Methods of thread synchronization
7. How to access GUI components in threads
First, thread overview
A process in the operating system must contain at least one thread, and then, at some point, need to perform multiple tasks simultaneously in the same process, or in order to provide the performance of the program, the task to be performed is decomposed into multiple subtask executions. This requires that multiple threads be opened in the same process. We use C # to write an application (either a console or a desktop program), and then run the program and open Windows Task Manager, and we'll see the number of threads in the application, as shown in the following figure.
If the task Manager does not have a number of threads column, you can view > select columns to display the thread Count column. As you can see from the illustration above, almost all processes have more than two threads. As you can see, threading is one of the most important ways to provide application performance, especially on multi-core CPUs.