LinkedBlockingQueue vs ConcurrentLinkedQueue

前端 未结 5 856
青春惊慌失措
青春惊慌失措 2020-12-02 03:56

My question relates to this question asked earlier. In situations where I am using a queue for communication between producer and consumer threads would people generally re

5条回答
  •  星月不相逢
    2020-12-02 04:50

    If your queue is non expandable and contains only one producer/consumer thread. You can use lockless queue (You don't need to lock the data access).

提交回复
热议问题