This particular app is running on CFMX6.1 so I don't have application.cfc
available.  I have a cfif IsObject(application.ws) in my application.cfm
which creates it if it's not there yet.  I don't know if that's thread safe
though. :(


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Watts
Sent: Friday, May 04, 2007 11:13 AM
To: cfcdev@cfczone.org
Subject: RE: [CFCDEV] Locking question

> So does my pointer which is in variables scope need to be locked if 
> I'm changing any of the instance variables in the object it's pointing 
> to?

Yes, if you are concerned about the possibility of a race condition. You
could just as well just reference application.ws directly instead of
creating the pointer in the first place, also.

> The  application.ws gets two initial values set in its init() 
> function, but after that it's all reading those variables or just 
> performing a web service.

In that case, you probably don't need to worry about locking at all, since
presumably you're only initializing it once, and you're doing that in a
thread-safe manner (for example, within the onApplicationStart method of
Application.cfc).

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized instruction
at our training centers in Washington DC, Atlanta, Chicago, Baltimore,
Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

This email has been processed by SmoothZap - www.smoothwall.net



You are subscribed to cfcdev. To unsubscribe, please follow the instructions
at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at
www.mail-archive.com/cfcdev@cfczone.org



You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at 
www.mail-archive.com/cfcdev@cfczone.org

Reply via email to