[thelist] cflock reads?

Raymond Camden jedimaster at macromedia.com
Mon Jan 21 14:33:56 CST 2002


> >  reads:
> >   <cflock scope="session" type="readonly"
> >          timeout="10" throwontimeout="no">
> >   <cfset foo = session.foo>
> >   </cflock>
> 
> jeff, could you please explain why locking this read is necessary?

It's necessary not just for logical reasons (ie, what you describe below
about a concurrent update) but also for server stability.

> if you ask the server for a value, are there cases where you 
> are you protecting yourself from updates to the value 
> *during* the read?
> 
> if so, who could be updating the value *while* you're reading 
> it?  okay, i
> can see how it could be another user on an application variable, but i
> thought the *session* variable belongs only to this user?  
> why does that
> have to be locked?

Frames is one way. The user could also hit reload multiple times, or use
multiple windows.

=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email    : jedimaster at macromedia.com
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 





More information about the thelist mailing list