Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static void interruptAndTillDies(final Thread thread) {
        if (thread != null) {
            thread.interrupt();
            tillDies(thread);
        }
    }

    public static void tillDies(Thread thread) {
        if (thread != null) {
            for (;;) {
                try {
                    thread.join();
                    break;
                } catch (InterruptedException ignore) {
                }
            }
        }
    }
}