I'm pretty sure that cffile is a global scope Try doing this on any page:
<cfdump var="#cffile#"> It pretty much has to live only for the duration of the request otherwise you'd have all sorts of weirdness happening, but whether it's thread safe or not with respect to other requests would depend on the implementation. Most likely it is tied to the request, so is thread safe, but the fact that it's a global scope feels like a bug, so it could be that it's not. Spike -------------------------------------------- Stephen Milligan Code poet for hire http://www.spike.org.uk Do you cfeclipse? http://cfeclipse.tigris.org >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Barney Boisvert >Sent: Tuesday, August 10, 2004 11:04 AM >To: [EMAIL PROTECTED] >Subject: Re: [CFCDev] Slightly OT - Is Thread Safe > >Nope, I'm not sure. I know you can't use 'var' to protect the >psuedo-scopes. My understanding is that they ended up in the >variables scope, but that might be incorrect. If I'm right, then my >solution would work. > >However, if they're global to the request, then it doesn't matter, >because you don't need to deal with concurrency in per-request scopes, >because CF is single-threaded within a given request. The only >potential issue would be if you're doing an isDefined() on one of the >psuedo-scopes, which is bad idea, IMHO. > >cheers, >barneyb > >On Tue, 10 Aug 2004 11:04:42 -0700, Spike <[EMAIL PROTECTED]> wrote: >> Are you sure about this? >> >> As far as I remember, CFFILE is a global scope like URL, >FORM, or REQUEST. I >> don't think you can avoid concurrency by creating a >one-time-use CFC. It's >> been a while since I ran the tests, but I seem to remember >that if you use a >> CFC to perform file operations such as upload, you can >access the cffile >> scope from the calling page. I think that would indicate >that the approach >> you suggest below won't be thread safe. >> >> For CFFILE the only way I know to make it thread safe is to >lock the access, >> then take a duplicate of the CFFILE scope before closing the lock. >> >> I don't know about any of the other scopes Peter asked about though. >> >> Spike >---------------------------------------------------------- >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]
