Esempio n. 1
0
        public void WaitForFinishing()
        {
            bool alive = true;

            while (alive && this.Threads.Count > 0)
            {
                alive = false;
                ThreadCollection removeList = new ThreadCollection();
                foreach (Thread thread in this.Threads)
                {
                    if (thread.IsAlive)
                    {
                        alive = true;
                    }
                    else
                    {
                        removeList.Add(thread);
                    }
                }
                foreach (Thread thread in removeList)
                {
                    this.Threads.Remove(thread);
                }
                // Fix for http://www.mertner.com/jira/browse/MBUNIT-134 by Richard Louapre
                Thread.Sleep(10);
            }
        }
Esempio n. 2
0
 public void Dispose()
 {
     if (this.threads != null)
     {
         this.AbortAll();
         this.Threads.Clear();
         this.threads = null;
     }
 }
 public Enumerator(ThreadCollection collection)
 {
     this.wrapped = ((System.Collections.CollectionBase)collection).GetEnumerator();
 }
Esempio n. 4
0
 public Enumerator(ThreadCollection collection)
 {
     this.wrapped = ((System.Collections.CollectionBase)collection).GetEnumerator();
 }
Esempio n. 5
0
		public void WaitForFinishing()
		{			
			bool alive = true;
			while (alive && this.Threads.Count>0)
			{
				alive=false;
                ThreadCollection removeList = new ThreadCollection();
				foreach(Thread thread in this.Threads)
				{
                    if ( thread.IsAlive )
                    {
                        alive = true;
                    }
                    else
                    {
                        removeList.Add( thread );
                    }
				}
                foreach ( Thread thread in removeList )
                {
                    this.Threads.Remove( thread );
                }
                // Fix for http://www.mertner.com/jira/browse/MBUNIT-134 by Richard Louapre
                Thread.Sleep(10);
			}
		}
Esempio n. 6
0
		public void Dispose()
		{
            if (this.threads != null)
            {
                this.AbortAll();
                this.Threads.Clear();
                this.threads = null;
            }
        }