Why the async method only works if he was the main method called?
If I call a method A and inside method A call a async method B don`t works?
Why the async method only works if he was the main method called?
If I call a method A and inside method A call a async method B don`t works?
Please show code
public class MyView {
MyService myservice;
public MyView(){
myService = BeanLocator.find(MyService.class);
myBtn.addClickListener(evt->btnProcessarArquivoListener());
}
private void btnProcessarArquivoListener() {
myService.processA();
}
}
@Service
public MyService {
public void processA(){
// process some code
processB();
}
@Async
public void processB(){
// process some code
}
}
If I change the @Async to processA works fine, but with this sample don’t works (my view wait to all return)