spring-projects/spring-framework — pull request #671 by MoonJongMin (2014-10-23 00:12:47+00:00)
Title: Fix First invocation of org.springframework.core.task.AsyncListenableTaskExecutor executes in same thread as caller

With relation to SPR-12358, as Juergen Hoeller and Sébastien Deleuze commented, adding a special delay time in the executor looks enough. We can think that the thread in the AsyncTaskExecutor will call callback method. But if a developer puts pretty much time spending code block between AsyncTaskExecutor's submitListenable and ListenableFuture's addCallback, that will not be enough. It might be a same problem.
So I slightly changed ListenableFutureCallbackRegistry.java in order to run a callback in a new thread when AsyncTask is already finished. At least this will prevent being blocked.

Issue: SPR-12358

I have signed and agree to the terms of the SpringSource Individual Contributor License Agreement.