public bool Join(long millisecondsTimeout) { if (millisecondsTimeout <= 0) { if (millisecondsTimeout == System.Threading.Timeout.Infinite) { millisecondsTimeout = 0; } else if (millisecondsTimeout == 0) { millisecondsTimeout = 1; } else { throw new System.ArgumentOutOfRangeException(); } } else if (millisecondsTimeout >= System.Int32.MaxValue) { throw new System.ArgumentOutOfRangeException(); } if (JavaThread.getState() == java.lang.Thread.State.NEW) { throw new System.Threading.ThreadStateException(); } JavaThread.join((int)millisecondsTimeout); return(JavaThread.isAlive()); }
public bool Join(int ms) { try { InternalValue.join(ms); } catch { throw; } return(!InternalValue.isAlive()); }