Is it possible to check whether a function was called from a async function or from a normal synchronous function?
void syncFunction(){
functionWithCheck();
}
@Async
void asyncFunction(){
functionWithCheck();
}
void functionWithCheck(){
// here I want to find out if the function was called from an async or sync context
if(...){
System.out.println("hello from asyncFunction");
}else{
System.out.println("hello from syncFunction");
}
}