It's an interesting topic, and really good timing for this to come up. I was at a CFUG sponsored conference, CF-Southwest yesterday. And the mighty B.F. was there, and talked quite about about this very subject. I do remember him answering a question with something like:
"no, if you only read application variables, you do not need to lock them."
Maybe I was drunk, but I don't remember drinking anything but a coke at lunch.
What I did pull out of that talk, though, was that you can not corrupt the server's memory with reads alone. Only writing to a variable while it is being read will cause the pcode exceptions you so diligently seek.
-Erik
> -----Original Message----- > From: Nat Papovich [mailto:nat@webthugs.com] > Sent: Wednesday, April 25, 2001 3:08 PM > To: Fusebox > Subject: RE: the $5 bet - crash a server with unlocked > application scope > READs > > > As a matter of fact I DO have a magical CF server that never > crashes, Erik. > You have one too? It's an Amiga. > > To prove a point, I did not mention the <cfif not > IsDefined("application.var")> tag before the application read > because I > wanted to imagine a case of ONLY reads. > > I might be seeming weird about it because I'm trying to get > the skinny on > exactly how locking works - something that I'm not even sure > Allaire knows > too much about. I think I pretty well have my noggin around it, but if > someone shows me the case of unlocked read-only access to a > shared scope > variable causing problems, then it's back to the drawing board for me. > > NAT > > > -----Original Message----- > > From: Erik Voldengen [mailto:erikv@erikv.com] > > Sent: Wednesday, April 25, 2001 1:24 PM > > To: Fusebox > > Subject: RE: the $5 bet - crash a server with unlocked > application scope > > READs > > > > > > > build. During some of this checking, I re-initialize the > application > > > variables, for good measure. This is the only time the > > > application variables > > > ever get written. There is no code anywhere else to do it, > > > and I am always > > > the only one on the admin area. > > > > That sounds flakey. What if CF restarts? ba-bye > application variables. > > Perhaps you have a magical machine with 100% up time? > > > > A read-only lock only adds overhead if there is an exclusive lock on > > the scope. Out of curiosity, why are you being so wierd about it? > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/fusebox@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists