Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static ArrayList<KThread> threads = new ArrayList<KThread>();
- public static void threadJoin3() {
- for (int i = 1; i < 10; i++){
- threads.add(new KThread(new PingTest(i)).setName("forked thread " + i));
- }
- for (int i = 0; i < 10; i++){
- threads.get(i).fork();
- threads.get(i).join();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement