title: Execute code in the same method after Thread.join() executes
body: <p>I have the problem, that the <code>join</code> Method, to kill a thread, is not executing the rest of the method, which was started also in the thread. Here is a code example:</p>
  
  <pre><code>private static Thread thread;
  
  public static void addMessage(final String s) {
      thread = new Thread() {
          @Override
          public void run() {
              String data = Message.send(s);
              addMessageToContainer(data);
          }
      };
      thread.start();
  }
  
  public static void addMessageToContainer(String data) {
      //Do some stuff with the data
      try {
          thread.join();
      } catch (InterruptedException e) {
          e.printStackTrace();
      }
      //This code here will not be executed.
  }
  </code></pre>
  
  <p>So normally, of course I can execute the code before I call the <code>join</code> function. But I have to load after this thread execution a webview with some content. So when I do remove the <code>join</code>, it will give me the following error message:</p>
  
  <pre><code>java.lang.RuntimeException: java.lang.Throwable: A WebView method was called on thread 'Thread-9072'. All WebView methods must be called on the same thread. (Expected Looper Looper (main, tid 1) {5ac9b39} called on null, FYI main Looper is Looper (main, tid 1) {5ac9b39})
  </code></pre>
  
  <p>So what can I do to load the content after the thread has executed?</p>