You've already forked linux-packaging-mono
Imported Upstream version 5.0.0.42
Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
This commit is contained in:
parent
1190d13a04
commit
6bdd276d05
@ -20,6 +20,7 @@ namespace MonoTests.System.Threading
|
||||
{
|
||||
public int id;
|
||||
public Mutex mut;
|
||||
public bool abandoned_exception;
|
||||
public ConcClass(int id,Mutex mut)
|
||||
{
|
||||
this.id = id;
|
||||
@ -63,7 +64,12 @@ namespace MonoTests.System.Threading
|
||||
|
||||
public void WaitAndForget()
|
||||
{
|
||||
this.Wait();
|
||||
try {
|
||||
this.Wait();
|
||||
} catch (AbandonedMutexException) {
|
||||
this.abandoned_exception = true;
|
||||
}
|
||||
|
||||
this.marker = id;
|
||||
}
|
||||
public void WaitAndWait()
|
||||
@ -137,7 +143,7 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestWaitAndFoget1()
|
||||
public void TestWaitAndForget1()
|
||||
{
|
||||
Mutex Sem = new Mutex(false);
|
||||
ConcClassLoop class1 = new ConcClassLoop(1,Sem);
|
||||
@ -148,9 +154,11 @@ namespace MonoTests.System.Threading
|
||||
try {
|
||||
thread1.Start();
|
||||
TestUtil.WaitForNotAlive (thread1, "t1");
|
||||
Assert.IsFalse (class1.abandoned_exception, "e1");
|
||||
|
||||
thread2.Start();
|
||||
TestUtil.WaitForNotAlive (thread2, "t2");
|
||||
Assert.IsTrue (class2.abandoned_exception, "e2");
|
||||
|
||||
Assert.AreEqual (class2.id, class2.marker);
|
||||
} finally {
|
||||
|
Reference in New Issue
Block a user