You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "Immanuel, Gidado-Yisa" <av...@cdc.gov> on 2001/05/24 19:19:57 UTC

double checked-locking

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