Just wondering if the new function StructAppend() in sp2 is lock safe.  In
the past you could use duplicate to copy complex data structures, such as
copying the session scope to the request scope.  Is
StructAppend() thread safe as well or does it just create pointers.

What I am doing is creating a blank structure...
<CFSET request.session = StructNew()>
then i load the whole session into the new structure
<CFLOCK SCOPE="SESSION" TYPE="READONLY" TIMEOUT="10" THROWONTIMEOUT="Yes">
        <CFSET mergedata = StructAppend(request.session,session,1)>
</CFLOCK>

Is this thread safe or is it better to do? ...

<CFLOCK SCOPE="SESSION" TYPE="READONLY" TIMEOUT="10" THROWONTIMEOUT="Yes">
        <CFSET request.session = Duplicate(session)>
</CFLOCK>

Mark Johnson
-----------------------
Senior Cold Fusion Developer
Cardinal Communications


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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