RE: Is CFLOCK Really Locking?

2001-08-14 Thread Brent Goldman

Hi,

CFLOCK statements usually lock scopes (like the application scope, as in
your example), but they don't single-thread an execution.  To do that, you
need to use CFLOCK with the NAME attributes, which basically won't execute a
piece of code within a CFLOCK statement until other pieces of code within a
CFLOCK statement of the same NAME attribute are finished processing.
Here is what you can use:


-Brent

-Original Message-
From: Leon Oosterwijk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 14, 2001 3:50 PM
To: CF-Talk
Subject: Is CFLOCK Really Locking?


All,

I've written a CFX Tag which implements some code that can only be execute
once per Virtual Machine. Since Cold Fusion uses only one Virtual Machine
per server only one person can execute this tag at a time. To facilitate
this I've wrappen the CustomTag in a CFLOCK. This Should keep this customer
tag single-threaded. However, on execution when i submit two reqwuests for
the same page at the same time one screen gets a result and the other screen
doesn't get anything. When i go through the logs it appears that only one
request gets adhered, the other one crashes the server. This seems strange
to me when the CFLOCK should single-thread the execution. please note that
i've tried both SCOPE and NAME attributes on the CFLOCK tag.





  
  
  Could Not Execute This page, Sorry
  


Leon Oosterwijk
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Is CFLOCK Really Locking?

2001-08-14 Thread Leon Oosterwijk

All, 

I've written a CFX Tag which implements some code that can only be execute
once per Virtual Machine. Since Cold Fusion uses only one Virtual Machine
per server only one person can execute this tag at a time. To facilitate
this I've wrappen the CustomTag in a CFLOCK. This Should keep this customer
tag single-threaded. However, on execution when i submit two reqwuests for
the same page at the same time one screen gets a result and the other screen
doesn't get anything. When i go through the logs it appears that only one
request gets adhered, the other one crashes the server. This seems strange
to me when the CFLOCK should single-thread the execution. please note that
i've tried both SCOPE and NAME attributes on the CFLOCK tag. 


 


  
  
  Could Not Execute This page, Sorry
  


Leon Oosterwijk

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists