Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. static ArrayList<KThread> threads = new ArrayList<KThread>();
  2. public static void threadJoin3() {
  3.  
  4. for (int i = 1; i < 10; i++){
  5. threads.add(new KThread(new PingTest(i)).setName("forked thread " + i));
  6. }
  7.  
  8. for (int i = 0; i < 10; i++){
  9. threads.get(i).fork();
  10. threads.get(i).join();
  11. }
  12.  
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement