Single threaded and multi-threaded differences single-threaded: only the main thread processing, if one operation occupies the main thread, then other operations will not be able to perform multithreading: In addition to the main thread, the child threads are also opened to perform operations, when the child threads perform operations, the main thread can perform other operations, but the child The thread cannot use the control of the main thread, and the main thread cannot know when the child thread will finish closing cross-thread detection so that the child can use the main thread's control
false;
Grammar
New Thread (); th. Start (); // Open Thread
To prevent the main thread and child threads from conflicting (manipulating one control at the same time), we can give the thread a loads lock so that other threads will wait for the locked thread to finish
Lock (this) { // action }
Thread sleep lets the thread wait a few seconds before continuing execution
Thread.Sleep (MS);
Asynchronous asynchronous operations are similar to threads, but are returned to the main thread keyword async when execution is complete. IsCompleted () Whether asynchronous execution completes
C # Basics Review four multi-threading