mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-23 16:56:31 +01:00
Fixed LongHashset incorrectly using read lock for popAll, and made it use write lock. This fixes BUKKIT-509
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
e3c83ba119
commit
a9e780978a
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue