1. Thread is used for a multithreaded implementation of a program, that is, multiple tasks can be done simultaneously; thread can also be used to do other work while waiting for a task to complete
2. In a single-core case, multitasking is slower than one, while multitasking is done in sequential order with each thread for a short period of time
3. The sleep method is to let the thread stop the corresponding time, such as Thread1.sleep (1000) is to stop for 1 seconds, while the death there are two, one is the completion of the natural end of the task, and the second is to execute the active kill thread:
--use Thread.Interrupt () method, ask the Thread to kill itself.
4. Mechanisms for synchronizing between several threads: 1.the Interlock class 2.The C # lock statement 3.The Monitor class
5. Avoid meaningless consumption caused by deadlocks
Thread of C #