On 4/26/01, Jon Hall penned:
>The author writes:
>"An easy answer to this problem is to dump the entire SESSION or APPLICATION
>scope into the REQUEST scope. ColdFusion does not 'share' the REQUEST scope
>between threads and it does not need to be locked. So by dumping all the
>shared variables to this scope, we can lock our variables once and then
>forget about it."
>
>Well I thought that cfsetting a session or application variable to a request
>scoped variable only set a pointer to the original variable so these request
>variables need to be locked too. I thought this is what the duplicate() is
>supposed to do (when it's fixed :-)).
>
>Am I incorrect?

Partially correct I believe. I think if you have a simple variable.

<cfset session.ID = "something">

Then cfset request.mysessionid = session.id>

You'll be OK as long as you exclusively lock the setting of the 
session scoped variable and read lock the setting of the request 
scoped variable. However if you store a complex structure, such as a 
query, in a session or application variable, then it creates a 
pointer and accessing the request scope would also need to be locked.
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to