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;
|
||||
}
|
||||
|
||||
private T pop() throws InterruptedException {
|
||||
T t = queue.take();
|
||||
synchronized (lock) {
|
||||
set.remove(t);
|
||||
private T pop() {
|
||||
try {
|
||||
T t = queue.take();
|
||||
synchronized (lock) {
|
||||
set.remove(t);
|
||||
}
|
||||
return t;
|
||||
} catch (InterruptedException ix) {
|
||||
return null;
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
public boolean remove(T t) {
|
||||
|
Loading…
Reference in New Issue
Block a user