Just to be very clear, as I am being quoted in this discussion, I wrote: .... But race conditions are still an issue, and if you are concerned about them then you still need to lock access to shared memory ... locking ... is needed in order to prevent race conditions, if those are an issue ...
I did not say that you must always lock, I said that you should lock to prevent race conditions "if those are an issue". As many others have already stated, race conditions are not necessarily problems, although they could be so. --- Ben -----Original Message----- From: Sean Corfield [mailto:[EMAIL PROTECTED] Sent: Sunday, April 15, 2007 2:13 PM To: CF-Talk Subject: Re: Using CFCs in session scope - need cflock help On 4/15/07, Andrew Scott <[EMAIL PROTECTED]> wrote: > > <cfset application.flag = true /> > > no on its own that can not cause a race condition, but if somewhere else > there is a read on that variable somewhere then that will cause a race > condition. Wrong. Code can read that variable to its heart's content all over the application without a race condition. > Now as this debate is being discussed because of a CFC inside of a session > scope, there is an extremely high chance that a race condtion is going to > occur, so as Ben says lock it. Not necessarily true. You can have a bean in session scope and never need to lock it. If the operations are *atomic*. You are just simply refusing to listen to what people are telling you and you aren't reading the documents closely enough. I don't think you actually understand what a race condition is...? -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275283 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4