Archiviert
13
0

Fixed LongHashset incorrectly using read lock for popAll, and made it use write lock. This fixes BUKKIT-509

Dieser Commit ist enthalten in:
Nathan Adams 2012-01-15 18:49:16 +00:00
Ursprung 95a72d1c59
Commit d3b4375d31

Datei anzeigen

@ -131,7 +131,7 @@ public class LongHashset extends LongHash {
public long[] popAll() {
int index = 0;
rl.lock();
wl.lock();
try {
long[] ret = new long[this.count];
for (long[][] outer : this.values) {
@ -150,7 +150,7 @@ public class LongHashset extends LongHash {
count = 0;
return ret;
} finally {
rl.unlock();
wl.unlock();
}
}