If I needed to call a function (everything is written in Java):
public int hello() {
int a = 1;
executeCallback();
return a;
}
public void executeCallback() {
randomClass.randomMethod(int a, int b, AsyncCallback<ReturnType>() {
onSuccess();
onFailure();
});
}
I understand that the material in comment A will be executed, and the non-synchronous randomMethod will be executed at the same time, and the comment will be executed in B.
I was wondering though, while randomMethod executes (if it takes a lot of time), the function will return to its caller (in this case, the hello method) and start executing the code in the C comment? Or will executeCallback wait for randomMethod to finish before it returns?
, , , randomMethod, C, "", , ?