You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Trustin Lee (JIRA)" <ji...@apache.org> on 2006/03/11 18:03:21 UTC

[jira] Updated: (DIRMINA-183) Use of "Double-Checked Locking" in ThreadPoolFilter

     [ http://issues.apache.org/jira/browse/DIRMINA-183?page=all ]

Trustin Lee updated DIRMINA-183:
--------------------------------

    Fix Version: 0.9.3

> Use of "Double-Checked Locking" in ThreadPoolFilter
> ---------------------------------------------------
>
>          Key: DIRMINA-183
>          URL: http://issues.apache.org/jira/browse/DIRMINA-183
>      Project: Directory MINA
>         Type: Bug
>     Reporter: peter royal
>      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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira