do not sort concrrently the same array

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7868 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 14 years ago
parent 77a9af99f1
commit 0a3ab7da1b

@ -616,8 +616,11 @@ public class RowCollection implements Sortable<Row.Entry>, Iterable<Row.Entry>,
public final void sort() {
if (this.sortBound == this.chunkcount) return; // this is sorted
net.yacy.cora.storage.Array.sort(this);
this.sortBound = this.chunkcount;
synchronized (this) {
if (this.sortBound == this.chunkcount) return; // check again
net.yacy.cora.storage.Array.sort(this);
this.sortBound = this.chunkcount;
}
}
public static class partitionthread implements Callable<Integer> {

Loading…
Cancel
Save