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/06 05:18:32 UTC
[jira] Commented: (DIRMINA-183) Use of "Double-Checked Locking" in
ThreadPoolFilter
[ http://issues.apache.org/jira/browse/DIRMINA-183?page=comments#action_12368972 ]
Trustin Lee commented on DIRMINA-183:
-------------------------------------
I know this issue. I did it intentionally because I've never seen any 1.4 VM which produces a problem with DCL. If you have a concern against this issue, let's just fix it! :)
> 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
>
> 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