看到java8里新的fork/join实现就用了work stealing的方式,更高效了 Parallel processing. In pre Java 8, the call to Arrays.sort( ) uses the merge sort algorithm sequentially. Java 8, introduces a new API for sorting the array in parallel with Arrays.parallelSort( ). Arrays.parallelSort( ) uses Fork/Join framework introduced in Java 7 to assign the sorting tasks to multiple threads available in the thread pool. Fork/Join implements a work stealing algorithm where an idle thread can steal tasks queued up in another thread.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货