Java tutorial
//package com.java2s; /** * This class is part of JCodec ( www.jcodec.org ) This software is distributed * under FreeBSD License * * @author The JCodec project * */ public class Main { public static void joinForSure(Thread thread) { while (true) { try { thread.join(); break; } catch (InterruptedException e) { } } } }