You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2014/06/29 03:27:25 UTC

[jira] [Created] (HTTPASYNC-78) AbstractMultiworkerIOReactor.DefaultThreadFactory.COUNT incorrect use of volatile

Sebb created HTTPASYNC-78:
-----------------------------

             Summary: AbstractMultiworkerIOReactor.DefaultThreadFactory.COUNT incorrect use of volatile
                 Key: HTTPASYNC-78
                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-78
             Project: HttpComponents HttpAsyncClient
          Issue Type: Bug
            Reporter: Sebb
            Priority: Minor


AbstractMultiworkerIOReactor.DefaultThreadFactory.COUNT is a volatile int which is incremented using ++COUNT.

This is not thread-safe; multiple threads can end up with the same value for COUNT.

Should probably use AtomicInt instead



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org