static void Main(string[] args) { //CreateThread.CreateThreadLambda(); //PassingDataToAThread.PassParamsToThread(12133); //PassingDataToAThread.PassParamsToLambdaThread(11111); //AbortAThread.AbortThread(); //AbortAThread.AbortThreadWithSharedFlagVariable(); //ThreadSyncronizationJoin.ThreadSyncJoin(); //ThreadLocal.RunThreadLocalExample(); //ThreadContextInfo.DisplayThreadContext(); ThreadPoolExample.ThreadPoolStuff(); }
static void Main(string[] args) { var exampleToRun = ExamplesEnumeration.ThreadPool; switch (exampleToRun) { case ExamplesEnumeration.SecondThread: SecondThreadExample.ShowSecondThread(); break; case ExamplesEnumeration.Join: JoinExamples.ShowJoin(); break; case ExamplesEnumeration.JoinFromSecondaryThread: JoinExamples.ShowJoinFromSecondaryThread(); break; case ExamplesEnumeration.GlobalVariable: GlobalVariableExample.ShowGlobalVariable(); break; case ExamplesEnumeration.Abort: AbortExample.ShowAbort(); break; case ExamplesEnumeration.Monitor: MonitorExample.ShowMonitor(); break; case ExamplesEnumeration.Interlocked: InterlockedExample.ShowLock(); break; case ExamplesEnumeration.ThreadPool: ThreadPoolExample.ShowThreadPool(); break; } Console.Read(); }