コード例 #1
0
ファイル: ThreadToRule.cs プロジェクト: Emelman/EPAM
        public ThreadToRule(int _sleep = 0, string _name = "default")
        {
            sleepTime     = _sleep;
            myThread      = new Thread(MainLogick);
            myThread.Name = _name;

            ObjectToSort job1 = new ObjectToSort();

            job1.myThreadName = myThread.Name;
            job1.Done        += job1.PrintJobDone;
        }
コード例 #2
0
ファイル: ThreadProcessor.cs プロジェクト: Emelman/EPAM
        public void CreateNewThread(int _sleep = 0, string _name = "default")
        {
            sleepTime = _sleep;

            myThread      = new Thread(StartThreadLogick);
            myThread.Name = _name;

            comparer = new ObjectToSort();
            comparer.myThreadName = myThread.Name;

            work               += comparer.StartSort;
            comparer.Done      += comparer.PrintJobDone;
            comparer.OverSleep += comparer.PrintSleepOver;
            startSleep          = Thread.Sleep;
        }