tag:blogger.com,1999:blog-6543397255913469784.post7734261688213384863..comments2024-03-29T00:49:13.240-07:00Comments on Are you ready: Executor With ConcurrentLinkedQueueAshkrithttp://www.blogger.com/profile/09218886398665853347noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-6543397255913469784.post-3144231134621497022023-02-19T06:59:58.043-08:002023-02-19T06:59:58.043-08:00Is it not enjoyable if we constantly discuss subje...Is it not enjoyable if we constantly discuss subjects like this. <a href="https://www.roscript.net/" rel="nofollow">weblink</a>Paras Aslamhttps://www.blogger.com/profile/11379888239595640449noreply@blogger.comtag:blogger.com,1999:blog-6543397255913469784.post-67509398561216016292019-06-21T07:27:56.926-07:002019-06-21T07:27:56.926-07:00Great blog post, I am surprised I did not run acro...Great blog post, I am surprised I did not run across this sooner.<br /><br />I thought I would echo that my findings have been basically the same. There is one big flaw with these queues however. While not a problem for just pure Executor's, they don't really offer any ability to schedule out tasks with a delay.<br /><br />For that reason in my thread pools in the threadly library ( https://github.com/threadly/threadly ), we use a ConcurrentLinkedQueue for executed tasks to gain the performance advantages, and then have a second, highly optimized queue structure for scheduled tasks. We then use LockSupport to park the threads as you found also to be the best performing option.<br /><br />If anyone ever wants to talk about this in more detail I welcome you to file an issue on github!Anonymousnoreply@blogger.com