Does this need explicit synchronization?

后端 未结 1 1520
被撕碎了的回忆
被撕碎了的回忆 2021-01-20 23:51

I have two threads, and I want to make sure I am doing the synchronization correctly on the LinkedBlockingQueue.. Is this correct? Or is the explicit synchronization on (messa

相关标签:
1条回答
  • 2021-01-21 00:08

    Yes, it's not necessary. JavaDoc says that:

    BlockingQueue implementations are thread-safe.

    0 讨论(0)
提交回复
热议问题