Concurrent and Blocking Queue in Java

后端 未结 6 2069
一生所求
一生所求 2020-12-12 18:42

I have the classic problem of a thread pushing events to the incoming queue of a second thread. Only this time, I am very interested about performance. What I want to achiev

6条回答
  •  再見小時候
    2020-12-12 18:47

    Here is a list of classes implementing BlockingQueue.

    I would recommend checking out SynchronousQueue.

    Like @Rorick mentioned in his comment, I believe all of those implementations are concurrent. I think your concerns with LinkedBlockingQueue may be out of place.

提交回复
热议问题