This should be an exclusive lock since you are modifying the value. And you
don't want to use an application-scoped lock since that single threads the
entire application scope. Use a named lock.

On Tue, Aug 16, 2011 at 12:43 PM, Varun Dixit <
vdi...@infoplexionsolutions.com> wrote:

>
> I have some code in front of me which is like this-
>
> <cflock scope="application" type="READONLY" timeout="50">
>    <cfset application.myVar = myQuery.myCol>
> </cflock>
>
> It's a CF8 in a multi server environment and I was seeing some
> inconsistencies. I always thought that when writing to a scope the lock
> should be of type "exclusive"- to let only request write to data.
>
> Just wanted to see what others think about locking variables in application
> or session scope for that matter.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:346788
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to