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
on in this case is OK, since the 'actions' FastHashMap
acts as a memory barrier (not sure if I'm using this
terminology correctly) for the new Action instances
that are created.

So this email is now just an FYI...

- Gidado

Reply via email to