[ 
https://issues.apache.org/jira/browse/DIRMINA-183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emmanuel Lecharny closed DIRMINA-183.
-------------------------------------


> Use of "Double-Checked Locking" in ThreadPoolFilter
> ---------------------------------------------------
>
>                 Key: DIRMINA-183
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-183
>             Project: MINA
>          Issue Type: Bug
>            Reporter: peter royal
>            Assignee: Trustin Lee
>             Fix For: 0.9.3
>
>
> In ThreadPoolFilter, the Double-Checked Locking pattern is used:
>         SessionBuffer buf = ( SessionBuffer ) buffers.get( session );
>         if( buf == null )
>         {
>             synchronized( buffers )
>             {
>                 buf = ( SessionBuffer ) buffers.get( session );
>                 if( buf == null )
>                 {
>                     buf = new SessionBuffer( session );
>                     buffers.put( session, buf );
>                 }
>             }
>         }
> .. this could lead to problems on multi-CPU systems 
> (http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to