Would the <cfset var transfer = duplicate(variables.transferBean)> approach work? I've briefly tested duplicating objects and it appears to work.
I can appreicate the 'genuinely local copy of a CFC instance' statement. I'm just looking to find some way of salvaging what I would *like* to see happen. Using duplicate() may be an option for that? Is there any way of truly testing this? If there was some sort of a sleep() function (other than a loop with a bazillion iterations), I was thinking I could instantiate one process with a large sleep time before it returns its bean value, and fire off a few more with smaller sleep times that would update their 'local' copies of the bean and return faster, then verify that each is returning what it should. Is this reasonable or just stupid? Thanks, Kevin > On Fri, 24 Sep 2004 09:14:40 +0200, Kevin J. Miller > <[EMAIL PROTECTED]> wrote: > > is used to move data back and forth between components; in the > > functions I do <cfset var transfer = > variables.transferBean> in order > > to get a local scoped copy, leaving the constructor copy intact, > > waiting for more requests > > NOT THREAD SAFE! > > This just creates a local *reference* to the shared CFC > instance. Only arrays and simple values are copied by > assignment, structs and objects (CFC instances) are handled > by reference. > > If you need a genuinely local copy of a CFC instance, you need to call > createObject() for each local instance. > -- > Sean A Corfield -- http://www.corfield.org/blog/ > > "If you're not annoying somebody, you're not really alive." > -- Margaret Atwood > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email > to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' > in the message of the email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported > by Mindtool, Corporation (www.mindtool.com). > > An archive of the CFCDev list is available at > www.mail-archive.com/[EMAIL PROTECTED] > ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
