> Basically, it seems to come down to this: if you are storing > a value in a shared-memory scope, and you are positive that > it will only be written to once, then you don't need to lock > reads or writes to this variable. > If there is any chance that it could be written to more than > once, then you must lock the write with an exclusive lock and > lock reads with a readonly lock. It's not enough to only > lock the write because you could still end up with a > situation where an unlocked read happens while the variable > is being written to. Is that in the ballpark?
Not true. Consider: <cfset application.dsn = "foo"> While it may waste 0.001 ms to run this twice, it's ok to run it twice (or N times) =========================================================================== Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email : [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
