@Sotr think is a thread-safe issue, so i use ConcurrentSkipListSet to replace TreeSet.

This commit without test, cause the issue #79 's issue i can't reproduce.
This commit is contained in:
Ghost_chu
2019-03-29 19:42:12 +08:00
parent 2a0f5f618e
commit c1f585fc61

View File

@@ -5,11 +5,15 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentSkipListSet;
public class HashTreeSet<V> implements Set<V> {
private Set<V> hash = new it.unimi.dsi.fastutil.objects.ObjectOpenHashSet<V>(); //Paper - Replace java.util.HashSet with ObjectOpenHashSet
private TreeSet<V> tree = new TreeSet<V>();
// Akarin Start
//private TreeSet<V> tree = new TreeSet<V>();
private ConcurrentSkipListSet<V> tree = new ConcurrentSkipListSet<V>();
// Akarin End
public HashTreeSet() {