I'd also argue that sometimes race conditions may not matter. Consider a session variable that tracks the # of pages you have viewed in your session. If I pop open a new tab and start reloading them both like crazy, it's possible the values may end up borked. But do we care? No. If it's just a simple stat and it's not perfect, then I'd ignore the hassle of locking the write/reads.
On Thu, Feb 2, 2012 at 7:11 AM, Cameron Childress <camer...@gmail.com> wrote: > > On Wed, Feb 1, 2012 at 7:37 PM, James Holmes <james.hol...@gmail.com> wrote: > >> Race conditions in session variables can only occur when two requests from >> the same session execute concurrently. This is more likely with ajax >> requests or framesets. Since everyone uses ajax requests these days (even >> though no-one uses framesets any more), it is still an issue, as you say. >> > > This can be true, depending on the situation and how you are using the > session scope. > > However, untrue is the old adage of "always lock your session variables". > > -Cameron > > -- > Cameron Childress > -- > p: 678.637.5072 > im: cameroncf > facebook <http://www.facebook.com/cameroncf> | > twitter<http://twitter.com/cameronc> | > google+ <https://profiles.google.com/u/0/117829379451708140985> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349745 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm