When should I use a CompletionService over an ExecutorService?

后端 未结 10 2147
后悔当初
后悔当初 2020-11-28 01:52

I just found CompletionService in this blog post. However, this does\'t really showcases the advantages of CompletionService over a standard ExecutorService. The same code c

10条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-28 02:37

    Omitting many details:

    • ExecutorService = incoming queue + worker threads
    • CompletionService = incoming queue + worker threads + output queue

提交回复
热议问题