in a spring application.
Have a call like this:
result = myCompletionService.take().get();
myCompletionService is type os CompletionService. By design, the thread will do some calculation and finish and exit. So, when spring shutdown, this call will get interruptionException and breaks the thread, which is not what I want. What I want is to let the thread run until finish. Then pass along this ShutDown signal. How can I do this?