title: Is java.lang.Thread itself a thread-safe class?
body: <p>I was wondering do we require external synchronization to use the methods in <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html" rel="nofollow noreferrer">java.lang.Thread</a>?</p>
  
  <p>For example, can we call the method <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#isAlive%28%29" rel="nofollow noreferrer">t1.isAlive()</a> from <strong>any</strong> thread <strong>without</strong> external synchronization and expect that it return:</p>
  
  <blockquote>
    <p>true if t1 has already been started,  false otherwise.</p>
  </blockquote>
  
  <p>Or is external synchronization required to call the methods in <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html" rel="nofollow noreferrer">java.lang.Thread</a>?</p>
  
  <pre><code>public static void main(String args[]) {
          final java.lang.Thread t1 = new java.lang.Thread(new java.lang.Runnable() {
  
              @Override
              public void run() {
                  while(true){
                      //task
                  }
              }
          });
          java.lang.Thread t2 = new java.lang.Thread(new java.lang.Runnable() {
  
              @Override
              public void run() {
                  while (true) {
                      System.out.println(t1.isAlive()); // do we need synchronization before calling isAlive() ?
                  }
              }
          });
          t2.start();
          t1.start();
          try {
              java.lang.Thread.sleep(1000000);
          } catch (java.lang.InterruptedException e) {
              e.printStackTrace();
          }
      }
  </code></pre>