struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Immanuel, Gidado-Yisa" <a...@cdc.gov>
Subject double checked-locking
Date Thu, 24 May 2001 17:19:57 GMT
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

Mime
View raw message