mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Fixed LongHashset incorrectly using read lock for popAll, and made it use write lock. This fixes BUKKIT-509
This commit is contained in:
1 parent
95a72d1c59
commit
d3b4375d31
1 file changed
+2
-2
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user