Double Checked Locking Help

2003-06-26 Thread David Graham
); 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

Re: Double Checked Locking Help

2003-06-26 Thread Kris Schneider
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

Re: Double Checked Locking Help

2003-06-26 Thread David Graham
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

Re: Double Checked Locking Help

2003-06-26 Thread Kris Schneider
); 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

double checked-locking

2001-05-24 Thread Immanuel, Gidado-Yisa
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