"{ Package: 'exept:regression' }"
"{ NameSpace: RegressionTests }"
TestCase subclass:#ContextTest2
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'Tests-Regression'
!
!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.
set := Set new.
x := 1 @ 1.
p := [:arg |
[
lockSet critical:[set add:arg].
arg perform:#x: with:1234.
] valueNowOrOnUnwindDo:[
lockSet critical:[set remove:arg].
].
] forkWith:(Array with:x).
"
self new testProcess2
"
! !
!ContextTest2 class methodsFor:'documentation'!
version
^ '$Header$'
! !