RegressionTests__ContextTest2.st
changeset 101 7ea8b99a38d8
parent 100 34d87daf0f75
child 102 f9c4503da06d
--- a/RegressionTests__ContextTest2.st	Sat Mar 31 17:27:15 2001 +0200
+++ b/RegressionTests__ContextTest2.st	Sat Mar 31 17:38:55 2001 +0200
@@ -13,6 +13,30 @@
 !ContextTest2 methodsFor:'tests'!
 
 testProcess1
+    |x set lockSet p arg|
+
+    lockSet := Semaphore forMutualExclusion.
+    set := Set new.
+
+    x := 1 @ 1.
+
+    arg := x.
+
+    p := [
+        [
+            lockSet critical:[set add:arg].
+            arg perform:#x .
+        ] valueNowOrOnUnwindDo:[
+            lockSet critical:[set remove:arg].
+        ].
+    ] fork.
+
+    "
+     self new testProcess1
+    "
+!
+
+testProcess2
     |x set lockSet p|
 
     lockSet := Semaphore forMutualExclusion.
@@ -30,7 +54,7 @@
     ] forkWith:(Array with:x).
 
     "
-     self new testProcess1
+     self new testProcess2
     "
 ! !