Example #1
0
		public static int Main(String [] str)
		{
			Console.Out.WriteLine( "RefCrossThds");
			Console.Out.WriteLine( "Should exit with a 100");
			// console synchronization Console.SetOut(TextWriter.Synchronized(Console.Out));
			Thread [] thd = new Thread[2];
			RefCrossThds mainobj = new RefCrossThds();

			for(int i=0; i< 2; i++)
			{
				ObjAry[i] = new Node();
			}

			for( int i=0; i<2; i++ )
			{
				thd[i] = new Thread( new ThreadStart( mainobj.RunThread ) );
				thd[i].Start();
			}
			Thread.Sleep(5000);
			for(int i=0; i< 2; i++)
			{
				ThreadAbort(thd[i]);
//				thd[i].Join();
			}
			Console.Out.WriteLine( "Test Passed");
			return 100;
		}
Example #2
0
		public Node()
		{
			mem= new int[256]; //1K
			mem[0] = 0;
			mem[255] = 256;
			Next = null;
			Last = null;
		}