public static void Run(ThreadTestCase testcase)
        {
            testcase.Setup();

            for (var i = 0; i < testcase.ThreadCount; i++)
            {
                var runnable = testcase.GetRunnable(i);
                var t = new Thread(runnable);
                t.Start(testcase.Argument);
            }

            if (testcase.WaitHandles != null)
                WaitHandle.WaitAll(testcase.WaitHandles);
        }
Esempio n. 2
0
        public static void Run(ThreadTestCase testcase)
        {
            testcase.Setup();

            for (var i = 0; i < testcase.ThreadCount; i++)
            {
                var runnable = testcase.GetRunnable(i);
                var t        = new Thread(runnable);
                t.Start(testcase.Argument);
            }

            if (testcase.WaitHandles != null)
            {
                WaitHandle.WaitAll(testcase.WaitHandles);
            }
        }