public void TestWaitAndFoget1() { Mutex Sem = new Mutex(false); ConcClassLoop class1 = new ConcClassLoop(1, Sem); ConcClassLoop class2 = new ConcClassLoop(2, Sem); Thread thread1 = new Thread(new ThreadStart(class1.WaitAndForget)); Thread thread2 = new Thread(new ThreadStart(class2.WaitAndForget)); try { thread1.Start(); TestUtil.WaitForNotAlive(thread1, "t1"); thread2.Start(); TestUtil.WaitForNotAlive(thread2, "t2"); Assert.AreEqual(class2.id, class2.marker); } finally { #if MONO_FEATURE_THREAD_ABORT thread1.Abort(); thread2.Abort(); #else thread1.Interrupt(); thread2.Interrupt(); #endif } }
public void TestWaitAndSignal1() { Mutex Sem = new Mutex(false); ConcClassLoop class1 = new ConcClassLoop(1, Sem); Thread thread1 = new Thread(new ThreadStart(class1.Loop)); try { thread1.Start(); TestUtil.WaitForNotAlive(thread1, ""); Assert.AreEqual(100, class1.marker); } finally { thread1.Abort(); } }
public void TestWaitAndSignal1() { Mutex Sem = new Mutex(false); ConcClassLoop class1 = new ConcClassLoop(1, Sem); Thread thread1 = new Thread(new ThreadStart(class1.Loop)); try { thread1.Start(); TestUtil.WaitForNotAlive(thread1, ""); Assert.AreEqual(100, class1.marker); } finally { #if MONO_FEATURE_THREAD_ABORT thread1.Abort(); #else thread1.Interrupt(); #endif } }
public void TestWaitAndFoget1() { Mutex Sem = new Mutex(false); ConcClassLoop class1 = new ConcClassLoop(1, Sem); ConcClassLoop class2 = new ConcClassLoop(2, Sem); Thread thread1 = new Thread(new ThreadStart(class1.WaitAndForget)); Thread thread2 = new Thread(new ThreadStart(class2.WaitAndForget)); try { thread1.Start(); TestUtil.WaitForNotAlive(thread1, "t1"); thread2.Start(); TestUtil.WaitForNotAlive(thread2, "t2"); Assert.AreEqual(class2.id, class2.marker); } finally { thread1.Abort(); thread2.Abort(); } }
public void TestWaitAndFoget1() { Mutex Sem = new Mutex(false); ConcClassLoop class1 = new ConcClassLoop(1,Sem); ConcClassLoop class2 = new ConcClassLoop(2,Sem); Thread thread1 = new Thread(new ThreadStart(class1.WaitAndForget)); Thread thread2 = new Thread(new ThreadStart(class2.WaitAndForget)); try { thread1.Start(); TestUtil.WaitForNotAlive (thread1, "t1"); thread2.Start(); TestUtil.WaitForNotAlive (thread2, "t2"); Assert.AreEqual (class2.id, class2.marker); } finally { thread1.Abort (); thread2.Abort (); } }
public void TestWaitAndSignal1() { Mutex Sem = new Mutex (false); ConcClassLoop class1 = new ConcClassLoop (1, Sem); Thread thread1 = new Thread (new ThreadStart (class1.Loop)); try { thread1.Start (); TestUtil.WaitForNotAlive (thread1, ""); Assert.AreEqual (100, class1.marker); } finally { thread1.Abort (); } }
public void TestWaitAndFoget1() { Mutex Sem = new Mutex(false); ConcClassLoop class1 = new ConcClassLoop(1,Sem); ConcClassLoop class2 = new ConcClassLoop(2,Sem); Thread thread1 = new Thread(new ThreadStart(class1.WaitAndForget)); Thread thread2 = new Thread(new ThreadStart(class2.WaitAndForget)); try { thread1.Start(); TestUtil.WaitForNotAlive (thread1, "t1"); thread2.Start(); TestUtil.WaitForNotAlive (thread2, "t2"); Assert.AreEqual (class2.id, class2.marker); } finally { #if MONO_FEATURE_THREAD_ABORT thread1.Abort (); thread2.Abort (); #else thread1.Interrupt (); thread2.Interrupt (); #endif } }
public void TestWaitAndSignal1() { Mutex Sem = new Mutex (false); ConcClassLoop class1 = new ConcClassLoop (1, Sem); Thread thread1 = new Thread (new ThreadStart (class1.Loop)); try { thread1.Start (); TestUtil.WaitForNotAlive (thread1, ""); Assert.AreEqual (100, class1.marker); } finally { #if MONO_FEATURE_THREAD_ABORT thread1.Abort (); #else thread1.Interrupt (); #endif } }