);
if (prefixes != null) {
return prefixes;
}
What if the rest of the code below that was inside a
synchronized(RequestUtils.class) {} block and the first thing that block
does is perform the check again?
Is this considered double checked locking? It's slightly different than
the examples I've
thing that block
does is perform the check again?
Is this considered double checked locking? It's slightly different than
the examples I've seen because we would be looking up the value in the
context instead of testing a member variable for null.
I think solution 2 will work but I want
that was inside a
synchronized(RequestUtils.class) {} block and the first thing that
block
does is perform the check again?
Is this considered double checked locking? It's slightly different
than
the examples I've seen because we would be looking up the value in the
context instead of testing
);
if (prefixes != null) {
return prefixes;
}
What if the rest of the code below that was inside a
synchronized(RequestUtils.class) {} block and the first thing that
block
does is perform the check again?
Is this considered double checked locking? It's slightly
I noticed an instance where double checked-locking
(DCL) is used in Struts:
org.apache.struts.action.ActionServlet
lines 1561 - 1586
According to the article below:
http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
But after further inspection, I think that what goes