-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLab2Try1.java
More file actions
35 lines (27 loc) · 808 Bytes
/
Copy pathLab2Try1.java
File metadata and controls
35 lines (27 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package lab2try1;
public class Lab2Try1 {
public static void main(String[] args) {
Integer thrQ = 100;
MThread threads[] = new MThread[thrQ];
for(int i = 0; i < thrQ; i++){
threads[i] = new MThread(i);
// try{
// Thread.sleep(100);
// }
// catch(InterruptedException me){
//
// }
}
for(int i = 0; i < thrQ; i++){
threads[i].start();
}
for(int i = 0; i < thrQ; i++){
try{
threads[i].join();
}
catch(InterruptedException me){
}
}
// System.out.println(MThread.meresult.get());
}
}