activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bgutjahr <>
Subject [GitHub] activemq-artemis issue #1144: ARTEMIS-1078: Improved thread pool
Date Wed, 29 Mar 2017 12:36:55 GMT
Github user bgutjahr commented on the issue:
    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 or file a JIRA ticket
with INFRA.

View raw message