-
Notifications
You must be signed in to change notification settings - Fork 2
/
Test2e.java
21 lines (20 loc) · 714 Bytes
/
Test2e.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class Test2e extends Thread {
public void run() {
String[] args1 = SysLib.stringToArgs( "TestThread2 a 5000 0" );
String[] args2 = SysLib.stringToArgs( "TestThread2 b 1000 0" );
String[] args3 = SysLib.stringToArgs( "TestThread2 c 3000 0" );
String[] args4 = SysLib.stringToArgs( "TestThread2 d 6000 0" );
String[] args5 = SysLib.stringToArgs( "TestThread2 e 500 0" );
SysLib.exec( args1 );
SysLib.exec( args2 );
SysLib.exec( args3 );
SysLib.exec( args4 );
SysLib.exec( args5 );
for (int i = 0; i < 5; i++ ) {
int tid = SysLib.join();
SysLib.cout( "Thread tid=" + tid + " done\n" );
}
SysLib.cout( "Test2e finished\n" );
SysLib.exit();
}
}