I want to make sure the the main thread is blocked until an asynchronous call is finished. I am creating a new Thread to execute the async code. here is my code:
Thread r = new Thread() {
public void run() {
asyncCall();
}
};
r.run();
r.join();
r.join
will block the main thread until r dies.
is that sufficient?
when the thread r actually dies? is it after the async call is done.