I want to sort an array using multiple syncronized threads. For example I want to use at least 2 threads开发者_Python百科 to sort the array and another thread to show me at some moments the situation of sorting. Some ideas please?
You can employ JSR 166y Fork Join framework to do parallel merge sort. You can see examples here and here.
Have you looked at:
java.util.Arrays.sort();
It doesn't use 2 threads - but how can that possibly be a requirement?
精彩评论