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);
        }
Example #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);
            }
        }