Scrivio Interview library
DebuggingFoundations6 min read · updated 12 November 2026

A method annotated with @Async runs on the caller thread instead of a pool thread. List the common causes.

An @Async method runs on the caller thread whenever the call never reaches Spring's async proxy or there is no proxy at all. The usual causes are a missing @EnableAsync, a call from another method of the same class (self-invocation), a private or final method, or an object that is not a Spring bean because it was created with new. A related mistake is a return type other than void or a Future type such as CompletableFuture, which breaks how results come back to the caller.

Why this question is asked

@Async looks like a one-word way to move work off the request thread, so when a slow method still blocks the request, it is confusing. Interviewers ask this because every cause comes from one mechanism, the proxy, and the same mechanism explains failures of @Transactional, @Cacheable and @Retryable. In this answer, we will recap how @Async works, see how to prove which thread a method runs on, go through each common cause with the broken code and the fix, and finish with the return type rules.

1A Quick Recap of How @Async Works

@Async asks Spring to run a method on a different thread, taken from a task executor (a thread pool that Spring manages), and to return to the caller immediately. Spring does not change our class to do this. When @EnableAsync is present, a bean post-processor, AsyncAnnotationBeanPostProcessor, looks at every bean as it is created. If a bean has @Async methods, it wraps the bean in a proxy, a generated object with the same type that sits in front of the real bean.

Other beans receive the proxy when they inject our bean. When they call an @Async method, the proxy catches the call, hands it to the executor as a task, and returns at once. If the call does not pass through that proxy, it is a plain Java call, and plain Java calls run on the thread that made them.

Step throughHow an @Async call leaves the caller thread
ControllerProxyExecutorNotifyService
sendWelcome(user) on http-nio-8080-exec-1
submit task
returns immediately
sendWelcome(user) on task-1

4 messages in order. Play them, or step through them one at a time.

Everything depends on the call reaching the proxy.

2Proving Which Thread Runs the Method

Before guessing, we log the thread name. Boot's default executor names its threads task-1, task-2 and so on, while Tomcat request threads are called http-nio-8080-exec-N.

Java
@Async
public void sendWelcome(User u) {
log.info("sending on {}", Thread.currentThread().getName());
}
// broken: sending on http-nio-8080-exec-3
// working: sending on task-1

If we see the request thread name, the call did not go through the async proxy, and the next sections tell us why.

3Cause 1: @EnableAsync Is Missing

Without @EnableAsync, no post-processor looks for @Async, no proxy is created, and the annotation is just ignored. Spring Boot does not turn async processing on by itself; it only auto-configures the executor that @Async will use. So the fix is one annotation on a configuration class.

Java
@Configuration
@EnableAsync // without this, @Async does nothing
class AsyncConfig { }

A quick check is to print the bean's class: AopUtils.isAopProxy(notifyService) returns false when no proxy exists.

4Cause 2: A Call From the Same Class

This is the most common cause. The method is called from another method of the same bean, so the call is really this.sendWelcome(u), and this is the real object, not the proxy.

Java
@Service
class NotifyService {
public void register(User u) {
save(u);
sendWelcome(u); // this.sendWelcome(u): skips the proxy, runs on the caller thread
}
@Async public void sendWelcome(User u) { ... }
}
// Fix: move the async method into its own bean
@Service
class WelcomeMailer {
@Async public void sendWelcome(User u) { ... } // called as mailer.sendWelcome(u): runs on task-1
}

The same thing happens when @Async is called from a @PostConstruct method of the same bean. The clean fix is a separate bean; injecting the bean into itself with @Lazy also works but hides the reason.

5Cause 3: Private or Final Methods, or Not a Spring Bean

Spring usually builds the proxy as a subclass of our class with CGLIB. A subclass cannot override a private method or a final method, so the proxy cannot intercept them, and the call runs directly. With interface-based JDK proxies, only methods declared on the interface are intercepted. So @Async methods must be public (or at least overridable and called from outside) and not final.

The other version of this cause is an object that Spring never created. If we write new NotifyService(), there is no proxy, because the post-processor only sees beans that the container builds. The same applies to objects created by a library or a JPA entity: annotations on them do nothing.

Kotlin deserves a mention here: its classes and methods are final by default, which is why Spring projects use the kotlin-spring compiler plugin to open them.

6The Return Type Rule

An @Async method should return void, or a Future type such as CompletableFuture. The reason is that the method returns before the work is done, so the caller cannot receive a real value. A Future is a placeholder the caller can wait on or chain from. Spring completes it when the task finishes.

Java
@Async
public CompletableFuture<Receipt> charge(Order o) {
return CompletableFuture.completedFuture(gateway.charge(o)); // Spring unwraps and completes its own future
}
CompletableFuture<Receipt> f = payments.charge(order); // returns at once
f.thenAccept(r -> log.info("paid {}", r.id())); // paid R-91, later on task-2
@Async public Receipt chargeWrong(Order o) { ... } // caller gets null

If the method returns a plain type like Receipt, the method still runs asynchronously, but the caller gets null and the real value is lost, which often looks like the method did not run. Exceptions also behave differently: with void they go to the AsyncUncaughtExceptionHandler, which by default just logs them, while with a Future they complete the future exceptionally. One last cause to rule out is configuration: if someone registered a synchronous executor, such as SyncTaskExecutor in a test profile, as the async executor, every task runs on the caller thread by design.

7Follow-up questions

Does @Async work on a method in an interface implemented by the bean?

Yes, as long as the caller goes through the proxy. With a JDK interface proxy, the method must be declared on the interface; with the default CGLIB class proxy in Boot, any public non-final method works.

How do you choose which executor an @Async method uses?

Give the name of an executor bean in the annotation, as in @Async("mailExecutor"). Without a name, Spring uses the default, which in Boot is the auto-configured applicationTaskExecutor, unless an AsyncConfigurer supplies another.

Why does the same cause break @Transactional?

Both are applied by proxies that intercept calls from outside the bean. A self-invocation bypasses every proxy-based annotation on the target method at once, which is why moving the method to another bean fixes both.

8Conclusion

In this answer, we saw that @Async only works when a call reaches the async proxy. We traced the four common causes, a missing @EnableAsync, self-invocation, private or final methods and objects that are not Spring beans, saw how to prove the thread with a log line, and learned why the return type must be void or a Future.

What to say in the interviewAbout 80 seconds aloud

Open with

The first thing I do is log Thread.currentThread().getName() inside the method. If it shows the Tomcat request thread instead of something like task-1, the call never reached the async proxy. @Async works because a bean post-processor wraps the bean in a proxy, and the proxy submits the call to an executor.

Then, if they want more

So I check the causes that remove or bypass that proxy. First, @EnableAsync may be missing; Boot provides an executor but does not enable async processing on its own.

Second, and most often, the method is called from another method in the same class, so it is a call on this and never goes through the proxy; I move the method to its own bean.

Third, the method is private or final, and a CGLIB subclass proxy cannot override it, or the object was created with new or by a library, so it is not a Spring bean and has no proxy at all. I also check the return type. It should be void or a CompletableFuture.

With a plain return type the method still runs asynchronously but the caller gets null, which can look like it did not run. And finally I make sure no synchronous executor, like SyncTaskExecutor from a test profile, is configured as the async executor.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "A method annotated with @Async runs on the caller thread instead of a pool thread. List...": https://scrivio-interview-library.netlify.app/spring-boot/spring-utilities/7c5a6fe175/