Lucene.Net.Search.TestTimeLimitingCollector.DoTestMultiThreads C# (CSharp) Method

DoTestMultiThreads() private method

private DoTestMultiThreads ( bool withTimeout ) : void
withTimeout bool
return void
        private void DoTestMultiThreads(bool withTimeout)
        {
            ThreadClass[] threadArray = new ThreadClass[N_THREADS];
            OpenBitSet success = new OpenBitSet(N_THREADS);
            for (int i = 0; i < threadArray.Length; ++i)
            {
                int num = i;
                threadArray[num] = new ThreadClassAnonymousHelper(this, success, withTimeout, num);
            }
            for (int i = 0; i < threadArray.Length; ++i)
            {
                threadArray[i].Start();
            }
            for (int i = 0; i < threadArray.Length; ++i)
            {
                threadArray[i].Join();
            }
            assertEquals("some threads failed!", N_THREADS, success.Cardinality());
        }