Thread B->C will not wait, because CFLOCK is "ADVISORY" locking, meaning it is the 
CFLOCK itself that causes the wait for the resource to be freed up. Cold Fusion takes 
no automatic action for you (unless you turn on those options in the administrator). 
It is up to the programmer to control resource locking with CFLOCKs.

So if you put a CFLOCK around a resource, and DONT put a CFLOCK around another use of 
that same resource, the first lock was useless.

At 01:59 PM 12/4/00 -0800, Gregory Harris wrote:
>I'm not locking up the entire page, but granted I'm working with code that I
>didn't develop, I need to run a CFLOCK over some of the area to ensure some
>integrity within CF.  Some of this code that is being locked has CFINCLUDE
>statements doing additional work.  This is why I'm curious.
>
>Basically it's something like this:
>
>Page A: Contains a just developed CFLOCK and a CFINCLUDE within to Page C
>Page B: Contains no CFLOCK statements but CFINCLUDES to page C
>Page C: No CFLOCK statements or further includes
>
>So if Page A starts and is in the lock, and Page C,  at the same time Page B
>starts up and asks for page C, does Page B wait? Or does Page B go ahead?
>
>P.S. I don't know what that second A stands for, innocent typo :-)
>
>Gregory Harris
>Web Developer
>Stirling Bridge Group LLC
>
>----- Original Message -----
>From: "Jones, Matt" <[EMAIL PROTECTED]>
>To: "CF-Talk" <[EMAIL PROTECTED]>
>Sent: Monday, December 04, 2000 11:24 AM
>Subject: RE: Another YAFLAQ (yet another f****** lock question)
>
>
>> Why are you locking the entire page?
>>
>> -----Original Message-----
>> From: Gregory Harris [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, December 04, 2000 11:47 AM
>> To: CF-Talk
>> Subject: Another YAFLAQ (yet another f****** lock question)
>>
>>
>> Ok, we all know that CFLOCK will lock up a page to single-threaded mode,
>but
>> my question is, if a Locked template encounters a CFINCLUDE statement,
>will
>> it lock up the resources in that page as well, for instance:
>>
>> I have Page A,B, and C
>>
>> Page A is locked up within a CFLOCK statement, but includes a CFINCLUDE to
>> page C, page A is running Page C when page B attempts to CFINCLUDE page C
>as
>> well.
>>
>> Will Page B be allowed to include Page C right away, or is it going to
>have
>> to wait until Page A clears the lock?
>>
>> Gregory Harris
>> Web Developer
>> Stirling Bridge Group LLC
>>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to