Fixed very long shutdown(?)
This commit is contained in:
parent
70429dc5a4
commit
612966734a
1 changed files with 5 additions and 2 deletions
|
|
@ -76,8 +76,9 @@ public class AsynchronousQueue<T> {
|
|||
|
||||
log.info("Stopping map renderer...");
|
||||
|
||||
oldThread.interrupt();
|
||||
try {
|
||||
oldThread.join();
|
||||
oldThread.join(1000);
|
||||
} catch (InterruptedException e) {
|
||||
log.info("Waiting for map renderer to stop is interrupted");
|
||||
}
|
||||
|
|
@ -99,10 +100,12 @@ public class AsynchronousQueue<T> {
|
|||
}
|
||||
}
|
||||
|
||||
private void sleep(int time) {
|
||||
private boolean sleep(int time) {
|
||||
try {
|
||||
Thread.sleep(time);
|
||||
} catch (InterruptedException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue