Example usage for java.util.concurrent ForkJoinPool toString

List of usage examples for java.util.concurrent ForkJoinPool toString

Introduction

In this page you can find the example usage for java.util.concurrent ForkJoinPool toString.

Prototype

public String toString() 

Source Link

Document

Returns a string identifying this pool, as well as its state, including indications of run state, parallelism level, and worker and task counts.

Usage

From source file:Test.java

public static void main(String[] args) {
    int numbers[] = new int[100000];
    ForkJoinPool forkJoinPool = new ForkJoinPool();
    long result = forkJoinPool.invoke(new SumOfSquaresTask(0, numbers.length));
    System.out.println("forkJoinPool: " + forkJoinPool.toString());
    System.out.println("forkJoinPool: " + forkJoinPool.toString());
    System.out.println("Sum of squares: " + result);
}