package edu.nyu.cs9053.concurrency.threads;

/**
 * User: blangel
 * Date: 11/9/14
 * Time: 5:39 PM
 */
public class RunawayThread {

    public static void main(String[] args) throws Exception {
        Runnable code = new Runnable() {
            @Override public void run() {
                while (true) {
                    System.out.printf("Howdy from \"%s\"!%n", Thread.currentThread().getName());
                }
            }
        };
        Thread separate = new Thread(code);
        separate.start();
        separate.join();
        System.out.printf("Separate thread completed [ %s ]%n", Thread.currentThread().getName());
    }

}
