Package jsr166y

Examples of jsr166y.ForkJoinPool.execute()


      tasks.add(new FileCounterRecursiveTaskWithPhaser(new File(c + ":\\"), phaser));
    }

    /* Launch tasks */
    for (FileCounterRecursiveTaskWithPhaser task : tasks) {
      taskExecutor.execute(task);
    }

    /*
     * Wait tasks termination using the Phaser and then display processing
     * state
 
View Full Code Here


    FileCounterRecursiveTask task01 = new FileCounterRecursiveTask(new File("C:\\"));
    FileCounterRecursiveTask task02 = new FileCounterRecursiveTask(new File("D:\\"));
    FileCounterRecursiveTask task03 = new FileCounterRecursiveTask(new File("E:\\"));
    // Explicit invalid path in order that the task fail !
    FileCounterRecursiveTask task04 = new FileCounterRecursiveTask(new File("A:\\"));
    taskExecutor.execute(task01);
    taskExecutor.execute(task02);
    taskExecutor.execute(task03);
    taskExecutor.execute(task04);
    System.out.println("Tasks launched...");
View Full Code Here

    FileCounterRecursiveTask task02 = new FileCounterRecursiveTask(new File("D:\\"));
    FileCounterRecursiveTask task03 = new FileCounterRecursiveTask(new File("E:\\"));
    // Explicit invalid path in order that the task fail !
    FileCounterRecursiveTask task04 = new FileCounterRecursiveTask(new File("A:\\"));
    taskExecutor.execute(task01);
    taskExecutor.execute(task02);
    taskExecutor.execute(task03);
    taskExecutor.execute(task04);
    System.out.println("Tasks launched...");

    /* Close the pool */
 
View Full Code Here

    FileCounterRecursiveTask task03 = new FileCounterRecursiveTask(new File("E:\\"));
    // Explicit invalid path in order that the task fail !
    FileCounterRecursiveTask task04 = new FileCounterRecursiveTask(new File("A:\\"));
    taskExecutor.execute(task01);
    taskExecutor.execute(task02);
    taskExecutor.execute(task03);
    taskExecutor.execute(task04);
    System.out.println("Tasks launched...");

    /* Close the pool */
    taskExecutor.shutdown();
 
View Full Code Here

    // Explicit invalid path in order that the task fail !
    FileCounterRecursiveTask task04 = new FileCounterRecursiveTask(new File("A:\\"));
    taskExecutor.execute(task01);
    taskExecutor.execute(task02);
    taskExecutor.execute(task03);
    taskExecutor.execute(task04);
    System.out.println("Tasks launched...");

    /* Close the pool */
    taskExecutor.shutdown();

 
View Full Code Here

    FileCounterRecursiveAction task01 = new FileCounterRecursiveAction(new File("C:\\"));
    FileCounterRecursiveAction task02 = new FileCounterRecursiveAction(new File("D:\\"));
    FileCounterRecursiveAction task03 = new FileCounterRecursiveAction(new File("E:\\"));
    // Explicit invalid path in order that the task fail !
    FileCounterRecursiveAction task04 = new FileCounterRecursiveAction(new File("A:\\"));
    taskExecutor.execute(task01);
    taskExecutor.execute(task02);
    taskExecutor.execute(task03);
    taskExecutor.execute(task04);
    System.out.println("Tasks launched...");
View Full Code Here

    FileCounterRecursiveAction task02 = new FileCounterRecursiveAction(new File("D:\\"));
    FileCounterRecursiveAction task03 = new FileCounterRecursiveAction(new File("E:\\"));
    // Explicit invalid path in order that the task fail !
    FileCounterRecursiveAction task04 = new FileCounterRecursiveAction(new File("A:\\"));
    taskExecutor.execute(task01);
    taskExecutor.execute(task02);
    taskExecutor.execute(task03);
    taskExecutor.execute(task04);
    System.out.println("Tasks launched...");

    /* Close the pool */
 
View Full Code Here

    FileCounterRecursiveAction task03 = new FileCounterRecursiveAction(new File("E:\\"));
    // Explicit invalid path in order that the task fail !
    FileCounterRecursiveAction task04 = new FileCounterRecursiveAction(new File("A:\\"));
    taskExecutor.execute(task01);
    taskExecutor.execute(task02);
    taskExecutor.execute(task03);
    taskExecutor.execute(task04);
    System.out.println("Tasks launched...");

    /* Close the pool */
    taskExecutor.shutdown();
 
View Full Code Here

    // Explicit invalid path in order that the task fail !
    FileCounterRecursiveAction task04 = new FileCounterRecursiveAction(new File("A:\\"));
    taskExecutor.execute(task01);
    taskExecutor.execute(task02);
    taskExecutor.execute(task03);
    taskExecutor.execute(task04);
    System.out.println("Tasks launched...");

    /* Close the pool */
    taskExecutor.shutdown();

 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.