. Net multithreading, thread Asynchronization, thread synchronization, concurrency issues --- 1 --- ShinePans
Application Thread, output thread status:
Using System; using System. collections. generic; using System. linq; using System. text; using System. threading; using System. threading. tasks; namespace Main thread 1 {class Program {static void Main (string [] args) {Console. writeLine ("current Thread status:"); // declare Thread variables and assign values to the current Thread primaryThread = Thread. currentThread; // value the name of the thread primaryThread. name = "main thread"; // displays information about the process Console. writeLine ("thread name: {0}", primaryThread. name); Console. writeLine ("thread startup status: {0}", primaryThread. isAlive); Console. writeLine ("thread priority: {0}", primaryThread. priority); Console. writeLine ("thread status: {0}", primaryThread. threadState); Console. readLine ();}}}