V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
c4f36e5766583218
V2EX  ›  问与答

Java : CyclicBarrier, CountDownLatch, 复用?

  •  
  •   c4f36e5766583218 · Apr 24, 2019 · 1872 views
    This topic created in 2570 days ago, the information mentioned may be changed or developed.
    • CyclicBarrier 是可以复用的,CyclicBarrier#await 在执行完指定数量后会对内部变量重置
    • CountDownLatch 无法进行重复使用。

    想问下 CountDownLatch 为什么不能复用或者复用会产生什么影响?不可以也 await 后重置吗?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   926 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 21:22 · PVG 05:22 · LAX 14:22 · JFK 17:22
    ♥ Do have faith in what you're doing.