Beispiel #1
0
            internal TestThread(TestUtil.Lock loke, IRunnable target_0)
            {
                this.loke   = loke;
                this.target = target_0;

                loke.Inc();
            }
Beispiel #2
0
        public static void RunUntilDone(IRunnable[] targets)
        {
            if (targets == null)
            {
                throw new ArgumentException("targets is null");
            }
            if (targets.Length == 0)
            {
                return;
            }

            TestUtil.Lock loke = new TestUtil.Lock();
            for (int i = 0; i < targets.Length; ++i)
            {
                new TestUtil.TestThread(loke, targets[i]).Start();
            }

            loke.Go();
        }