private void TestParkRunnable() { try { LockSupport.Park(); } catch (Exception) { ThreadUnexpectedException(); } }
private void TestParkUntilRunnable() { try { LockSupport.ParkUntil(DateTime.Now.AddMilliseconds(100)); } catch (Exception) { ThreadUnexpectedException(); } }
private void TestParkRunnable2() { try { Thread.Sleep(SHORT_DELAY_MS); LockSupport.Park(); } catch (Exception) { ThreadUnexpectedException(); } }
private void TestParkRunnable4() { try { Thread.SpinWait(200); LockSupport.Park(); } catch (Exception e) { ThreadUnexpectedException(e); } }
public void TestPark2() { Thread t = new Thread(TestParkRunnable2); try { t.Start(); LockSupport.UnPark(t); t.Join(); } catch (Exception e) { UnexpectedException(e); } }
public void TestPark() { Thread t = new Thread(TestParkRunnable); try { t.Start(); Thread.Sleep(SHORT_DELAY_MS); LockSupport.UnPark(t); t.Join(); } catch (Exception e) { UnexpectedException(e); } }