mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 19:25:15 +01:00
Clean up shutdown of async queue
This commit is contained in:
parent
f335641eab
commit
1253ac2e6a
@ -36,12 +36,16 @@ public class AsynchronousQueue<T> {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private T pop() throws InterruptedException {
|
private T pop() {
|
||||||
T t = queue.take();
|
try {
|
||||||
synchronized (lock) {
|
T t = queue.take();
|
||||||
set.remove(t);
|
synchronized (lock) {
|
||||||
|
set.remove(t);
|
||||||
|
}
|
||||||
|
return t;
|
||||||
|
} catch (InterruptedException ix) {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
return t;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean remove(T t) {
|
public boolean remove(T t) {
|
||||||
|
Loading…
Reference in New Issue
Block a user