$ java TimeoutBehaviorDemo

=== CountDownLatch.await(timeout): expects 2, only 1 ever counts down ===
await returned: false (false = timed out, latch still usable to re-check later)
getCount() after timeout: 1

=== CyclicBarrier.await(timeout): expects 2 parties, only 1 arrives ===
await threw TimeoutException, as expected
barrier.isBroken() after the timeout: true
a second, later await() on the SAME barrier: BrokenBarrierException immediately - one timeout poisons the barrier for everyone until reset()

=== Phaser.awaitAdvanceInterruptibly(phase, timeout): expects 2 parties, only 1 arrives ===
awaitAdvanceInterruptibly threw TimeoutException, as expected
phaser.getPhase() after the timeout: 0 (unchanged - still phase 0, not advanced or broken)
a later round on the SAME phaser, once both parties actually arrive: succeeds normally, now at phase 1

=== Semaphore.tryAcquire(timeout): 0 permits available ===
tryAcquire returned: false (false = timed out, no exception, no broken state)
a later tryAcquire after a release: true - fully independent of the earlier timeout
done
