1447
|
1 |
"{ Package: 'stx:goodies/regression' }"
|
223
|
2 |
|
|
3 |
"{ NameSpace: RegressionTests }"
|
|
4 |
|
|
5 |
TestCase subclass:#SemaphoreTest
|
|
6 |
instanceVariableNames:''
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
2051
|
9 |
category:'tests-Regression-Processes'
|
223
|
10 |
!
|
|
11 |
|
|
12 |
|
|
13 |
!SemaphoreTest methodsFor:'tests'!
|
|
14 |
|
|
15 |
testSpeed01
|
|
16 |
|s t|
|
|
17 |
|
|
18 |
s := Semaphore forMutualExclusion.
|
|
19 |
t := Time millisecondsToRun:[
|
|
20 |
1000000 timesRepeat:[ s critical:[1+1] ]
|
|
21 |
].
|
|
22 |
Transcript showCR:t
|
|
23 |
|
|
24 |
"
|
|
25 |
self run:#testSpeed01
|
|
26 |
"
|
|
27 |
! !
|
|
28 |
|
|
29 |
!SemaphoreTest class methodsFor:'documentation'!
|
|
30 |
|
|
31 |
version
|
|
32 |
^ '$Header$'
|
|
33 |
! !
|
2051
|
34 |
|