A simple question on @Async annotation.
For example: A method is @Async annotated and it contains thread.sleep for few seconds. And after the sleep, their is a outStream.println. Then what is the result.
I have used ThreadPoolTaskExecutor as executor
I just want to know as i have tried above with a sleep of 5 seconds, but getting outStream.println in fraction of second. So I just want to understand if this is how Async annotation works i.e., if it has given the instant response and thread.sleep is executed by other thread.