Make asynchronous code blocking
<p>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:</p>

<pre><code>Thread r = new Thread() {
    public void run() {
    asyncCall();
    }
};
r.run();
r.join();
</code></pre>

<p><code>r.join</code> 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.  </p>