CFLOCK is for single threaded access.  Coldfusion is a multi-threaded
application which means that two people can access coldfusion at the exact
same time and therefore code that you write could potentially be accessed by
two people at the exact same time.  This is undesireable in the case of
application or session variables because one person might read from that
variable while another might write to it.  Also, in some datbase actions,
you might not two people accessing the same record at the same time or
something (although your database software might have features to handle
this better than CFLOCK.)

You use CFLOCK when you want a portion of code to be single-threaded, that
is, that span of code, even if two people access the page simulataneously,
will process one person first, then the next.  This may slow down
performance a bit on that code, but sometimes is necessary.

Fregas

----- Original Message -----
From: "Scott Wilhelm" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, February 11, 2003 2:17 PM
Subject: CFLOCK


> Can someone please explain to me, in very simply terms, what CFLOCK
> does, and why/when/where I should use it?
>
> I'm trying to build an application, and put it together as proper as can
> be, but for some reason, my brain doesn't want to comprehen CFLOCK.
>
> Thanks,
>
> Scott
>
>
> Scott Wilhelm
> Computer Technician/Web Developer
> St. Lawrence-Lewis BOCES
> PO Box 231, Outer State Street
> Canton, NY 13617
>
> P.         315-386-4504 x 164
> F.         315-386-3395
> W.           http://www.sllboces.org
> E.            [EMAIL PROTECTED]
>
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to