You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by bgutjahr <gi...@git.apache.org> on 2017/03/29 12:36:55 UTC

[GitHub] activemq-artemis issue #1144: ARTEMIS-1078: Improved thread pool

Github user bgutjahr commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1144
  
    I replaced my code with a new implemented. I could not get rid of using synchronization, since the timeout-handle block in poll has to be synchronized with offer. But I made a couple of improvements:
    1. I used a private lock object to synchronize on
    2. I added comments to explain how the code works
    3. I fixed a race condition that had been caused by using queue.size(), which changed within super.poll/take calls by now thread-safely maintaining the delta beween queue tasks and idle threads.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---