You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "peter royal (JIRA)" <ji...@apache.org> on 2006/03/04 21:19:39 UTC
[jira] Created: (DIRMINA-183) Use of "Double-Checked Locking" in
ThreadPoolFilter
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
[jira] Commented: (DIRMINA-183) Use of "Double-Checked Locking" in
ThreadPoolFilter
Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
[ 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
[jira] Updated: (DIRMINA-183) Use of "Double-Checked Locking" in
ThreadPoolFilter
Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
[ 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
[jira] Resolved: (DIRMINA-183) Use of "Double-Checked Locking" in
ThreadPoolFilter
Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DIRMINA-183?page=all ]
Trustin Lee resolved DIRMINA-183:
---------------------------------
Resolution: Fixed
Assign To: Trustin Lee
Removed DCL idiom from ThreadPoolFilter.
> 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
> 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.
-
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