> > > if i understand correctly, a week or so ago you (dave) 
> > > mentioned that duplicate was only necessary for a session 
> > > structure if it contained other complex variables. you said 
> > > that StructCopy was sufficient if it was merely a structure 
> > > with simple variables. is this correct?
> >
> > Yes, that's correct. Personally, I just use Duplicate 
> > whenever I want to pass a structure by value, so I don't even 
> > think about it.
>
> Why not just copy the pointer from the session scope to the 
> request scope? Wouldn't the single-threaded nature of the request 
> scope protect the actual data from corruption? 

There's a problem with the phrase "copy a pointer". If you interpret that to
mean, "pass a variable by reference", then no, it wouldn't prevent
concurrent access to the variables requiring protection.

> I suppose the question I have is HOW does the CF server force 
> single threading in the request scope:
> 
> 1.  By forcing every request into its own memory space or
> 2.  By internally recognizing and locking the data associated with 
> the request scope

I think you may have a misunderstanding about the nature of the Request
scope. There's nothing that the CF server needs to do to force single
threading in the Request scope, because the Request scope isn't a persistent
memory scope in the same way that, say, the Session scope is. The Request
scope is only available to the scripts used to respond to a single HTTP
request, and those scripts are procedural - they execute "from top to
bottom", so to speak.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to