Discussions

News: Tech Article: Fork and Join: Java Can Excel at Painless Parallel Programming Too!

  1. This tech article Fork and Join: Java Can Excel at Painless Parallel Programming Too!
    describes the rich primitives added in Java SE 5 and Java SE 6 by the java.util.concurrent packages to deal with concurrency and the fork/join framework provided in Java SE 7 to support parallelism. Brought to you by the Oracle Technology Network.

  2. describes the rich primitives added in Java SE 5 and Java SE 6 by the java.util.concurrent packages to deal with concurrency and the fork/join framework provided in Java SE 7 to support parallelism. Brought to you by the Oracle Technology Network.

  3. describes the rich primitives added in Java SE 5 and Java SE 6 by the java.util.concurrent packages to deal with concurrency and the fork/join framework provided in Java SE 7 to support parallelism. Brought to you by the Oracle Technology Network.

     

  4. Missed opportunity?[ Go to top ]

    In the sample, it creates Tasks and then in a loop blocks waiting for each task to finish. If the post processing for a task was expensive post join then blocking for a specific task may not be optimal. Is there a way to join on ANY of these tasks, i.e. the first one to complete rather than an explicit task? A task collection with a joinFirst method or similar? That would probably allow the joiner thread to get more done.