176
|
1 |
"{ Package: 'exept:regression' }"
|
|
2 |
|
274
|
3 |
"{ NameSpace: RegressionTests }"
|
|
4 |
|
582
|
5 |
nil subclass:#ManyProcessesTest
|
176
|
6 |
instanceVariableNames:''
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
582
|
9 |
category:'tests-Regression'
|
176
|
10 |
!
|
|
11 |
|
|
12 |
|
582
|
13 |
!ManyProcessesTest class methodsFor:'others'!
|
|
14 |
|
|
15 |
version_CVS
|
|
16 |
^ '$Header$'
|
|
17 |
! !
|
|
18 |
|
176
|
19 |
!ManyProcessesTest methodsFor:'test'!
|
|
20 |
|
|
21 |
start:count
|
|
22 |
"
|
178
|
23 |
ManyProcessesTest new test400
|
176
|
24 |
"
|
|
25 |
|waitSema|
|
|
26 |
|
|
27 |
waitSema := Semaphore new.
|
|
28 |
waitSema setCount:(1 - count).
|
|
29 |
|
|
30 |
count timesRepeat:[
|
274
|
31 |
[ [Delay waitForSeconds:0.4.] ensure:[waitSema signal].
|
|
32 |
] forkAt:(Processor userBackgroundPriority)
|
176
|
33 |
].
|
|
34 |
waitSema wait.
|
|
35 |
!
|
|
36 |
|
|
37 |
test400
|
|
38 |
"
|
|
39 |
self new test400
|
|
40 |
"
|
|
41 |
|waitSema repeat|
|
|
42 |
|
|
43 |
repeat := 4.
|
|
44 |
|
177
|
45 |
'Makefile' asFilename readStream close.
|
|
46 |
|
176
|
47 |
waitSema := Semaphore new.
|
|
48 |
waitSema setCount:(1 - repeat).
|
|
49 |
|
|
50 |
repeat timesRepeat:[
|
274
|
51 |
[ [self start:100] ensure:[waitSema signal]
|
|
52 |
] forkAt:8.
|
176
|
53 |
].
|
178
|
54 |
waitSema wait.
|
|
55 |
Transcript showCR:'done'.
|
176
|
56 |
! !
|
|
57 |
|
|
58 |
!ManyProcessesTest class methodsFor:'documentation'!
|
|
59 |
|
|
60 |
version
|
|
61 |
^ '$Header$'
|
|
62 |
! !
|