{\r
public int id;\r
public Mutex mut;\r
+ public bool abandoned_exception;\r
public ConcClass(int id,Mutex mut)\r
{\r
this.id = id;\r
\r
public void WaitAndForget()\r
{\r
- this.Wait();\r
+ try {\r
+ this.Wait();\r
+ } catch (AbandonedMutexException) {\r
+ this.abandoned_exception = true;\r
+ }\r
+\r
this.marker = id;\r
}\r
public void WaitAndWait()\r
}\r
\r
[Test]\r
- public void TestWaitAndFoget1()\r
+ public void TestWaitAndForget1()\r
{\r
Mutex Sem = new Mutex(false);\r
ConcClassLoop class1 = new ConcClassLoop(1,Sem);\r
try {\r
thread1.Start();\r
TestUtil.WaitForNotAlive (thread1, "t1");\r
+ Assert.IsFalse (class1.abandoned_exception, "e1");\r
\r
thread2.Start();\r
TestUtil.WaitForNotAlive (thread2, "t2");\r
+ Assert.IsTrue (class2.abandoned_exception, "e2");\r
\r
Assert.AreEqual (class2.id, class2.marker);\r
} finally {\r