# | Line 618 | Line 618 | public class SemaphoreTest extends JSR16 | |
---|---|---|
618 | final Semaphore s = new Semaphore(2, true); | |
619 | Thread t = new Thread(new CheckedRunnable() { | |
620 | public void realRun() throws InterruptedException { | |
621 | < | threadAssertTrue(s.tryAcquire(2, SHORT_DELAY_MS, MILLISECONDS)); |
621 | > | assertTrue(s.tryAcquire(2, SHORT_DELAY_MS, MILLISECONDS)); |
622 | s.release(2); | |
623 | < | threadAssertTrue(s.tryAcquire(2, SHORT_DELAY_MS, MILLISECONDS)); |
623 | > | assertTrue(s.tryAcquire(2, SHORT_DELAY_MS, MILLISECONDS)); |
624 | s.release(2); | |
625 | }}); | |
626 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |